Skip to content

Commit

Permalink
fix failing test now that repo is on react 17 [run ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
AtofStryker committed Nov 6, 2024
1 parent d1cf67c commit 6b480f3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 29 deletions.
7 changes: 6 additions & 1 deletion npm/react/cypress/component/basic/rerender/effects.cy.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ it('should run unmount effect cleanup when unmounting', () => {

cy
.then(() => ReactDom.unmountComponentAtNode(getContainerEl()))
.then(() => {
.then(async () => {
// does not call useEffect in react 17 unmount synchronously.
// @see https://github.com/facebook/react/issues/20263
// to keep this test working, we need to flush the microtask queue.
await new Promise((r) => setTimeout(r))

expect(layoutEffectCleanup).to.have.been.callCount(1)
expect(effectCleanup).to.have.been.callCount(1)
})
Expand Down
8 changes: 4 additions & 4 deletions npm/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"axios": "0.21.2",
"cypress": "0.0.0-development",
"prop-types": "15.7.2",
"react": "16.8.6",
"react-dom": "16.8.6",
"react-router": "6.0.0-alpha.1",
"react-router-dom": "6.0.0-alpha.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-router": "6.10.0",
"react-router-dom": "6.10.0",
"semver": "^7.5.3",
"typescript": "~5.4.5",
"vite": "5.2.11",
Expand Down
25 changes: 1 addition & 24 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2548,7 +2548,7 @@
core-js-pure "^3.0.0"
regenerator-runtime "^0.13.4"

"@babel/runtime@^7.0.0", "@babel/runtime@^7.10.0", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.6", "@babel/runtime@^7.18.9", "@babel/runtime@^7.25.0", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4":
"@babel/runtime@^7.0.0", "@babel/runtime@^7.10.0", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.6", "@babel/runtime@^7.18.9", "@babel/runtime@^7.25.0", "@babel/runtime@^7.8.4":
version "7.25.0"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.0.tgz#3af9a91c1b739c569d5d80cc917280919c544ecb"
integrity sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw==
Expand Down Expand Up @@ -18230,13 +18230,6 @@ highlight.js@^8.5.0:
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-8.9.1.tgz#b8a9c5493212a9392f0222b649c9611497ebfb88"
integrity sha1-uKnFSTISqTkvAiK2SclhFJfr+4g=

[email protected]:
version "5.0.0-beta.4"
resolved "https://registry.yarnpkg.com/history/-/history-5.0.0-beta.4.tgz#7fd3bb1f6c75d00d9b5112a816766bfc72d1a3cd"
integrity sha512-LMUnKPB5UlEzDF1BO0VxtDsrguGPO7SuQEmB/5OjL1305afR1O8FvX29rbJep4g2SLmKK3YdDA7+8ZDs8P8n8g==
dependencies:
"@babel/runtime" "^7.7.6"

hmac-drbg@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1"
Expand Down Expand Up @@ -26404,14 +26397,6 @@ react-remove-scroll@^2.3.0:
use-callback-ref "^1.2.3"
use-sidecar "^1.0.1"

[email protected]:
version "6.0.0-alpha.1"
resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.0.0-alpha.1.tgz#10798a64402d3f113ba8e5bed04bf3009b1d28df"
integrity sha512-k53/EN/yOIy+iSuolJc+3uGAUq06AuEhTXDCac2Hk+YBfRD4fD0cQL3Ram79J8ishRQehycjcfn3+S45iNZb9g==
dependencies:
history "5.0.0-beta.4"
prop-types "^15.7.2"

[email protected]:
version "6.10.0"
resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.10.0.tgz#090ddc5c84dc41b583ce08468c4007c84245f61f"
Expand All @@ -26420,14 +26405,6 @@ [email protected]:
"@remix-run/router" "1.5.0"
react-router "6.10.0"

[email protected]:
version "6.0.0-alpha.1"
resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.0.0-alpha.1.tgz#1bc907f221476e5514370bf296defe41c57e70cd"
integrity sha512-OMQHBebegYqFUKvp9ylogY1bnMGy+hSfYMFmY2VKvVgkYVkBIZwFbhBOwe8IP448KFCrIAyPafBidpJyk9Ga9g==
dependencies:
history "5.0.0-beta.4"
prop-types "^15.7.2"

[email protected]:
version "6.10.0"
resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.10.0.tgz#230f824fde9dd0270781b5cb497912de32c0a971"
Expand Down

0 comments on commit 6b480f3

Please sign in to comment.