Skip to content

Commit efc8e56

Browse files
committed
test: clear the frameloop before each test
Before this commit, we cleared the frameloop after each test, but that led to issues where RenderResult objects were unmounted *after* the frameloop was cleared, which can start the frameloop up again before the next test.
1 parent 513f686 commit efc8e56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core/test/setup.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ let frameCache: WeakMap<any, any[]>
1717
beforeEach(() => {
1818
isRunning = true
1919
frameCache = new WeakMap()
20+
frameLoop.clear()
2021

2122
global.mockRaf = createMockRaf()
2223
Globals.assign({
@@ -31,7 +32,6 @@ beforeEach(() => {
3132

3233
afterEach(() => {
3334
isRunning = false
34-
frameLoop.clear()
3535
})
3636

3737
// This observes every SpringValue animation when "advanceUntil" is used.

0 commit comments

Comments
 (0)