Skip to content

Commit baf96af

Browse files
committed
test: fix the test to actually test what we can test for
1 parent 9e3747c commit baf96af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/__tests__/cleanup.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ test('cleanup does not error when an element is not a child', async () => {
2727
await cleanup()
2828
})
2929

30-
test('cleanup waits for queued microtasks during unmount sequence', async () => {
30+
test('cleanup runs effect cleanup functions', async () => {
3131
const spy = jest.fn()
3232

3333
const Test = () => {
34-
React.useEffect(() => () => setTimeout(spy, 200))
34+
React.useEffect(() => spy)
3535

3636
return null
3737
}

0 commit comments

Comments
 (0)