-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
34 lines (30 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
diff --git a/index.d.ts b/index.d.ts
index 5aa018cde4336aca4dadefb8338549c378792e14..2e0c38efc15e793dc37e401e2513016247058f37 100644
--- a/index.d.ts
+++ b/index.d.ts
@@ -329,13 +329,15 @@ export interface FakeTimerInstallOpts {
now?: number | Date | undefined;
/**
- * An array with names of global methods and APIs to fake. By default, `@sinonjs/fake-timers` does not replace `nextTick()` and `queueMicrotask()`.
- * 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 everything available globally except `nextTick`
*/
toFake?: FakeMethod[] | undefined;
/**
- * The maximum number of timers that will be run when calling runAll() (default: 1000)
+ * The maximum number of timers that will be run when calling runAll()
+ * @default 10000
*/
loopLimit?: number | undefined;
@@ -352,8 +354,8 @@ export interface FakeTimerInstallOpts {
advanceTimeDelta?: number | undefined;
/**
- * Tells FakeTimers to clear 'native' (i.e. not fake) timers by delegating to their respective handlers. These are not cleared by
- * default, leading to potentially unexpected behavior if timers existed prior to installing FakeTimers. (default: false)
+ * Tells FakeTimers to clear 'native' (i.e. not fake) timers by delegating to their respective handlers.
+ * @default true
*/
shouldClearNativeTimers?: boolean | undefined;
}