Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add default for
fakeTimers.toFake
(#5197)
Co-authored-by: Anjorin Damilare <damilareanjorin1@gmail.com> Co-authored-by: Vladimir <sleuths.slews0s@icloud.com>
- Loading branch information
1 parent
fee7d8b
commit 2e8e05e
Showing
5 changed files
with
46 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 ['setTimeout', 'clearTimeout', 'setImmediate', 'clearImmediate', 'setInterval', 'clearInterval', 'Date'] | ||
*/ | ||
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; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.