Skip to content

Commit

Permalink
chore: fix failed test and make pnpm version is sync with `packageMan…
Browse files Browse the repository at this point in the history
…ger`
  • Loading branch information
promer94 committed May 4, 2023
1 parent be7faf6 commit 94dbb88
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: ./.github/workflows/install

- name: Install Canary
run: pnpm upgrade react@canary react-dom@canary
run: corepack pnpm upgrade react@canary react-dom@canary use-sync-external-store@canary

- name: Lint and test
run: |
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@
"lint-staged": "13.1.0",
"next": "^13.1.6",
"prettier": "2.8.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "18.3.0-canary-aef7ce554-20230503",
"react-dom": "18.3.0-canary-aef7ce554-20230503",
"rimraf": "4.1.2",
"swr": "workspace:*",
"typescript": "4.9.4"
Expand All @@ -142,6 +142,6 @@
"trailingComma": "none"
},
"dependencies": {
"use-sync-external-store": "^1.2.0"
"use-sync-external-store": "1.3.0-canary-aef7ce554-20230503"
}
}
77 changes: 42 additions & 35 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion test/use-swr-suspense.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ describe('useSWR - suspense', () => {
<Section />
</Suspense>
)

// FIXME: without this line, the test will fail with react@canary
await sleep(5)
await screen.findByText(updatedKey)
// fixes https://github.com/vercel/swr/issues/57
// initialKey' -> undefined -> updatedKey
Expand Down

0 comments on commit 94dbb88

Please sign in to comment.