Skip to content

Commit ea7aee6

Browse files
authored
Merge branch 'test/global-vitest-fake-timers-before-each' into test/global-vitest-clock-baseline
2 parents 1114a71 + 812e9a2 commit ea7aee6

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

apps/desktop-ui/src/utils/refUtil.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
import { describe, expect, it, vi } from 'vitest'
1+
import { beforeEach, describe, expect, it, vi } from 'vitest'
22
import { computed, nextTick, ref } from 'vue'
33

44
import { withSetup } from '@/test/withSetup'
55
import { useMinLoadingDurationRef } from '@/utils/refUtil'
66

77
describe('useMinLoadingDurationRef', () => {
8+
beforeEach(() => {
9+
vi.useFakeTimers({ shouldAdvanceTime: false })
10+
})
11+
812
it('reflects false when source is initially false', () => {
913
const source = ref(false)
1014
const result = withSetup(() => useMinLoadingDurationRef(source))

0 commit comments

Comments
 (0)