Skip to content

Commit edd4387

Browse files
committed
Use legacy fake timers
1 parent 8f4017f commit edd4387

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

packages/toolkit/src/query/tests/cacheCollection.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { waitMs } from './helpers'
44
import type { Middleware, Reducer } from 'redux'
55

66
beforeAll(() => {
7-
jest.useFakeTimers()
7+
jest.useFakeTimers('legacy')
88
})
99

1010
const onCleanup = jest.fn()

packages/toolkit/src/query/tests/cacheLifecycle.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { fetchBaseQuery } from '@reduxjs/toolkit/query'
44
import { expectType, fakeTimerWaitFor, setupApiStore, waitMs } from './helpers'
55

66
beforeAll(() => {
7-
jest.useFakeTimers()
7+
jest.useFakeTimers('legacy')
88
})
99

1010
const api = createApi({

packages/toolkit/src/query/tests/cleanup.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function UsingAB() {
3535
}
3636

3737
beforeAll(() => {
38-
jest.useFakeTimers()
38+
jest.useFakeTimers('legacy')
3939
})
4040

4141
test('data stays in store when component stays rendered', async () => {

packages/toolkit/src/query/tests/retry.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { createApi, retry } from '@reduxjs/toolkit/query'
33
import { setupApiStore, waitMs } from './helpers'
44

55
beforeEach(() => {
6-
jest.useFakeTimers()
6+
jest.useFakeTimers('legacy')
77
})
88

99
const loopTimers = async (max: number = 12) => {

0 commit comments

Comments
 (0)