mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
Also add 'hrtime' method.
This commit is contained in:
Vendored
+1
-1
@@ -51,7 +51,7 @@ type Clock = BrowserClock | NodeClock;
|
||||
/**
|
||||
* Names of clock methods that may be faked by install.
|
||||
*/
|
||||
type FakeMethod = "setTimeout" | "clearTimeout" | "setImmediate" | "clearImmediate" | "setInterval" | "clearInterval" | "Date" | "nextTick";
|
||||
type FakeMethod = "setTimeout" | "clearTimeout" | "setImmediate" | "clearImmediate" | "setInterval" | "clearInterval" | "Date" | "nextTick" | "hrtime";
|
||||
|
||||
/**
|
||||
* Controls the flow of time.
|
||||
|
||||
@@ -22,7 +22,7 @@ lolex.install<lolex.BrowserClock>({
|
||||
now: 0,
|
||||
shouldAdvanceTime: true,
|
||||
target: {},
|
||||
toFake: ["setTimeout"]
|
||||
toFake: ["setTimeout", "nextTick", "hrtime"]
|
||||
});
|
||||
|
||||
const browserNow: number = browserClock.now;
|
||||
|
||||
Reference in New Issue
Block a user