Skip to content

Commit 40829f7

Browse files
committed
test: restore real timers after minimap interval lifecycle tests
1 parent aa7c127 commit 40829f7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/renderer/extensions/minimap/composables/useMinimap.intervalLifecycle.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* the vueuse timing primitives wholesale, which cannot catch a polling loop
55
* that fails to stop on hide/destroy or resumes eagerly on show.
66
*/
7-
import { beforeEach, describe, expect, it, vi } from 'vitest'
7+
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
88
import { nextTick, shallowRef } from 'vue'
99

1010
import {
@@ -130,6 +130,10 @@ describe('useMinimap change-detection interval', () => {
130130
mockNodes[0].pos = [0, 0]
131131
})
132132

133+
afterEach(() => {
134+
vi.useRealTimers()
135+
})
136+
133137
it('polls on the interval and redraws when the graph changed', async () => {
134138
await initMinimap()
135139
const before = drawCalls()

0 commit comments

Comments
 (0)