Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: remove console.error times check #2918

Merged
merged 2 commits into from
Mar 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/test-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ jobs:
run: corepack pnpm upgrade react@canary react-dom@canary use-sync-external-store@canary

- name: Lint and test
env:
TEST_REACT_LEGACY: 1
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should not enable lagacy root in canary test ?

run: |
pnpm clean
pnpm build
Expand Down
3 changes: 0 additions & 3 deletions test/use-swr-promise.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,6 @@ describe('useSWR - promise', () => {
await screen.findByText('loading')
await act(() => sleep(100)) // wait 100ms until the request inside throws
await screen.findByText('error boundary')

// 1 for js-dom 1 for react-error-boundary
expect(console.error).toHaveBeenCalledTimes(3)
})

it('should handle same fallback promise that is already pending', async () => {
Expand Down
3 changes: 0 additions & 3 deletions test/use-swr-subscription.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,5 @@ describe('useSWRSubscription', () => {
await screen.findByText(
'The `subscribe` function must return a function to unsubscribe.'
)

// 1 for js-dom 1 for react-error-boundary
expect(console.error).toHaveBeenCalledTimes(2)
})
})
2 changes: 0 additions & 2 deletions test/use-swr-suspense.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ describe('useSWR - suspense', () => {
// hydration
screen.getByText('fallback')
await screen.findByText('error boundary')
// 1 for js-dom 1 for react-error-boundary
expect(console.error).toHaveBeenCalledTimes(3)
})

it('should render cached data with error', async () => {
Expand Down
Loading