Skip to content

Commit 2bc52bf

Browse files
sukvvonmanudeli
andauthored
test(query-core/onlineManager): replace 'advanceTimersByTimeAsync' with 'advanceTimersByTime' (#9337)
Co-authored-by: Jonghyeon Ko <manudeli.ko@gmail.com>
1 parent d0bea3f commit 2bc52bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/query-core/src/__tests__/onlineManager.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ describe('onlineManager', () => {
3434
navigatorSpy.mockRestore()
3535
})
3636

37-
test('setEventListener should use online boolean arg', async () => {
37+
test('setEventListener should use online boolean arg', () => {
3838
let count = 0
3939

4040
const setup = (setOnline: (online: boolean) => void) => {
@@ -47,7 +47,7 @@ describe('onlineManager', () => {
4747

4848
onlineManager.setEventListener(setup)
4949

50-
await vi.advanceTimersByTimeAsync(30)
50+
vi.advanceTimersByTime(20)
5151
expect(count).toEqual(1)
5252
expect(onlineManager.isOnline()).toBeFalsy()
5353
})

0 commit comments

Comments
 (0)