diff --git a/docs/config/index.md b/docs/config/index.md index ed8717bca9bf..b99a3ae1b4e6 100644 --- a/docs/config/index.md +++ b/docs/config/index.md @@ -2527,7 +2527,7 @@ Installs fake timers with the specified Unix epoch. #### fakeTimers.toFake - **Type:** `('setTimeout' | 'clearTimeout' | 'setImmediate' | 'clearImmediate' | 'setInterval' | 'clearInterval' | 'Date' | 'nextTick' | 'hrtime' | 'requestAnimationFrame' | 'cancelAnimationFrame' | 'requestIdleCallback' | 'cancelIdleCallback' | 'performance' | 'queueMicrotask')[]` -- **Default:** `['setTimeout', 'clearTimeout', 'setImmediate', 'clearImmediate', 'setInterval', 'clearInterval', 'Date']` +- **Default:** everything available globally except `nextTick` An array with names of global methods and APIs to fake. diff --git a/patches/@types__sinonjs__fake-timers@8.1.5.patch b/patches/@types__sinonjs__fake-timers@8.1.5.patch index 4f52bfa71f59..47cd33ebb3b6 100644 --- a/patches/@types__sinonjs__fake-timers@8.1.5.patch +++ b/patches/@types__sinonjs__fake-timers@8.1.5.patch @@ -10,7 +10,7 @@ index 5aa018cde4336aca4dadefb8338549c378792e14..2e0c38efc15e793dc37e401e25130162 - * For instance, `FakeTimers.install({ toFake: ['setTimeout', 'nextTick'] })` will fake only `setTimeout()` and `nextTick()` + * An array with names of global methods and APIs to fake. + * For instance, `vi.useFakeTimer({ toFake: ['setTimeout', 'performance'] })` will fake only `setTimeout()` and `performance.now()` -+ * @default ['setTimeout', 'clearTimeout', 'setImmediate', 'clearImmediate', 'setInterval', 'clearInterval', 'Date'] ++ * @default everything available globally except `nextTick` */ toFake?: FakeMethod[] | undefined;