File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -818,8 +818,8 @@ Mocking `nextTick` is not supported when running Vitest inside `node:child_proce
818818The implementation is based internally on [ ` @sinonjs/fake-timers ` ] ( https://github.com/sinonjs/fake-timers ) .
819819
820820::: tip
821- ` vi.useFakeTimers() ` does not automatically mock ` process.nextTick ` .
822- But you can enable it by specifying the option in ` toFake ` argument: ` vi.useFakeTimers({ toFake: ['nextTick'] }) ` .
821+ ` vi.useFakeTimers() ` does not automatically mock ` process.nextTick ` and ` queueMicrotask ` .
822+ But you can enable it by specifying the option in ` toFake ` argument: ` vi.useFakeTimers({ toFake: ['nextTick', 'queueMicrotask' ] }) ` .
823823:::
824824
825825### vi.isFakeTimers {#vi-isfaketimers}
Original file line number Diff line number Diff line change @@ -2345,7 +2345,7 @@ Installs fake timers with the specified Unix epoch.
23452345#### fakeTimers.toFake
23462346
23472347- ** Type:** ` ('setTimeout' | 'clearTimeout' | 'setImmediate' | 'clearImmediate' | 'setInterval' | 'clearInterval' | 'Date' | 'nextTick' | 'hrtime' | 'requestAnimationFrame' | 'cancelAnimationFrame' | 'requestIdleCallback' | 'cancelIdleCallback' | 'performance' | 'queueMicrotask')[] `
2348- - ** Default:** everything available globally except ` nextTick `
2348+ - ** Default:** everything available globally except ` nextTick ` and ` queueMicrotask `
23492349
23502350An array with names of global methods and APIs to fake.
23512351
You can’t perform that action at this time.
0 commit comments