Skip to content

Commit 89a14b7

Browse files
authored
test: remove console.error times check (#2918)
* test: remove console.error times check * remove legacyroot flag for canary
1 parent efb4255 commit 89a14b7

File tree

4 files changed

+0
-10
lines changed

4 files changed

+0
-10
lines changed

.github/workflows/test-canary.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ jobs:
1919
run: corepack pnpm upgrade react@canary react-dom@canary use-sync-external-store@canary
2020

2121
- name: Lint and test
22-
env:
23-
TEST_REACT_LEGACY: 1
2422
run: |
2523
pnpm clean
2624
pnpm build

test/use-swr-promise.test.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,6 @@ describe('useSWR - promise', () => {
146146
await screen.findByText('loading')
147147
await act(() => sleep(100)) // wait 100ms until the request inside throws
148148
await screen.findByText('error boundary')
149-
150-
// 1 for js-dom 1 for react-error-boundary
151-
expect(console.error).toHaveBeenCalledTimes(3)
152149
})
153150

154151
it('should handle same fallback promise that is already pending', async () => {

test/use-swr-subscription.test.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,5 @@ describe('useSWRSubscription', () => {
321321
await screen.findByText(
322322
'The `subscribe` function must return a function to unsubscribe.'
323323
)
324-
325-
// 1 for js-dom 1 for react-error-boundary
326-
expect(console.error).toHaveBeenCalledTimes(2)
327324
})
328325
})

test/use-swr-suspense.test.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,6 @@ describe('useSWR - suspense', () => {
115115
// hydration
116116
screen.getByText('fallback')
117117
await screen.findByText('error boundary')
118-
// 1 for js-dom 1 for react-error-boundary
119-
expect(console.error).toHaveBeenCalledTimes(3)
120118
})
121119

122120
it('should render cached data with error', async () => {

0 commit comments

Comments
 (0)