Skip to content

Commit

Permalink
test: remove console.error times check (#2918)
Browse files Browse the repository at this point in the history
* test: remove console.error times check

* remove legacyroot flag for canary
  • Loading branch information
promer94 committed Mar 31, 2024
1 parent efb4255 commit 89a14b7
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 10 deletions.
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
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

0 comments on commit 89a14b7

Please sign in to comment.