mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-30 01:47:21 +08:00
Merge pull request #21676 from knee-cola/master
added `advanceTimersByTime` metod
This commit is contained in:
11
types/jest/index.d.ts
vendored
11
types/jest/index.d.ts
vendored
@@ -145,10 +145,16 @@ declare namespace jest {
|
||||
*/
|
||||
function runOnlyPendingTimers(): typeof jest;
|
||||
/**
|
||||
* Executes only the macro task queue (i.e. all tasks queued by setTimeout()
|
||||
* or setInterval() and setImmediate()).
|
||||
* (renamed to `advanceTimersByTime` in Jest 21.3.0+) Executes only the macro
|
||||
* task queue (i.e. all tasks queued by setTimeout() or setInterval() and setImmediate()).
|
||||
*/
|
||||
function runTimersToTime(msToRun: number): typeof jest;
|
||||
/**
|
||||
* Advances all timers by msToRun milliseconds. All pending "macro-tasks" that have been
|
||||
* queued via setTimeout() or setInterval(), and would be executed within this timeframe
|
||||
* will be executed.
|
||||
*/
|
||||
function advanceTimersByTime(msToRun: number): typeof jest;
|
||||
/**
|
||||
* Explicitly supplies the mock object that the module system should return
|
||||
* for the specified module.
|
||||
@@ -867,6 +873,7 @@ declare namespace jest {
|
||||
runAllTicks(): void;
|
||||
runAllTimers(): void;
|
||||
runTimersToTime(msToRun: number): void;
|
||||
advanceTimersByTime(msToRun: number): void;
|
||||
runOnlyPendingTimers(): void;
|
||||
runWithRealTimers(callback: any): void;
|
||||
useFakeTimers(): void;
|
||||
|
||||
Reference in New Issue
Block a user