MCPcopy
hub / github.com/jestjs/jest / setSystemTime

Method setSystemTime

packages/jest-environment/src/index.ts:385–385  ·  view source on GitHub ↗

* Set the current system time used by fake timers. Simulates a user changing * the system clock while your program is running. It affects the current time, * but it does not in itself cause e.g. timers to fire; they will fire exactly * as they would have done without the call to `jest.setSy

(now?: number | Date | TemporalEpochLike)

Source from the content-addressed store, hash-verified

383 * Not available when using legacy fake timers implementation.
384 */
385 setSystemTime(now?: number | Date | TemporalEpochLike): void;
386 /**
387 * Set the default timeout interval for tests and before/after hooks in
388 * milliseconds.

Callers 13

resetMethod · 0.65
setSystemTimeMethod · 0.65
buildJestObjectMethod · 0.65
getSummary.test.tsFile · 0.65
jest.test.tsFile · 0.65
clock.test.jsFile · 0.65

Calls

no outgoing calls

Tested by

no test coverage detected