Skip to content

Commit c64f77b

Browse files
committed
docs: mention the change
1 parent 2a50a24 commit c64f77b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/config/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2277,7 +2277,7 @@ Installs fake timers with the specified Unix epoch.
22772277
#### fakeTimers.toFake
22782278

22792279
- **Type:** `('setTimeout' | 'clearTimeout' | 'setImmediate' | 'clearImmediate' | 'setInterval' | 'clearInterval' | 'Date' | 'nextTick' | 'hrtime' | 'requestAnimationFrame' | 'cancelAnimationFrame' | 'requestIdleCallback' | 'cancelIdleCallback' | 'performance' | 'queueMicrotask')[]`
2280-
- **Default:** `['setTimeout', 'clearTimeout', 'setImmediate', 'clearImmediate', 'setInterval', 'clearInterval', 'Date']`
2280+
- **Default:** everything available globally except `nextTick`
22812281

22822282
An array with names of global methods and APIs to fake.
22832283

patches/@[email protected]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ index 5aa018cde4336aca4dadefb8338549c378792e14..2e0c38efc15e793dc37e401e25130162
1010
- * For instance, `FakeTimers.install({ toFake: ['setTimeout', 'nextTick'] })` will fake only `setTimeout()` and `nextTick()`
1111
+ * An array with names of global methods and APIs to fake.
1212
+ * For instance, `vi.useFakeTimer({ toFake: ['setTimeout', 'performance'] })` will fake only `setTimeout()` and `performance.now()`
13-
+ * @default ['setTimeout', 'clearTimeout', 'setImmediate', 'clearImmediate', 'setInterval', 'clearInterval', 'Date']
13+
+ * @default everything available globally except `nextTick`
1414
*/
1515
toFake?: FakeMethod[] | undefined;
1616

0 commit comments

Comments
 (0)