Skip to content

Commit

Permalink
docs: mention the change
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Dec 5, 2024
1 parent 3082bbd commit 9078e3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion patches/@types__sinonjs__fake-timers@8.1.5.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 9078e3a

Please sign in to comment.