Skip to content

Commit 19b0fd0

Browse files
committed
test(vanilla/utils/unwrap): remove unnecessary 'act' wrapper from vanilla store test
1 parent f674996 commit 19b0fd0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/vanilla/utils/unwrap.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { act } from '@testing-library/react'
21
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
32
import { atom, createStore } from 'jotai/vanilla'
43
import { unwrap } from 'jotai/vanilla/utils'
@@ -153,12 +152,12 @@ describe('unwrap', () => {
153152
const syncAtom = unwrap(asyncAtom)
154153
store.sub(syncAtom, () => {})
155154

156-
await act(() => vi.advanceTimersByTimeAsync(0))
155+
await vi.advanceTimersByTimeAsync(0)
157156
expect(() => store.get(syncAtom)).toThrow('error')
158157

159158
store.set(asyncAtom, Promise.resolve(3))
160159

161-
await act(() => vi.advanceTimersByTimeAsync(0))
160+
await vi.advanceTimersByTimeAsync(0)
162161
expect(store.get(syncAtom)).toBe(3)
163162
})
164163

0 commit comments

Comments
 (0)