MCPcopy Index your code
hub / github.com/testing-library/react-testing-library / jestFakeTimersAreEnabled

Function jestFakeTimersAreEnabled

src/pure.js:16–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14import {getConfig, configure} from './config'
15
16function jestFakeTimersAreEnabled() {
17 /* istanbul ignore else */
18 if (typeof jest !== 'undefined' && jest !== null) {
19 return (
20 // legacy timers
21 setTimeout._isMockFunction === true || // modern timers
22 // eslint-disable-next-line prefer-object-has-own -- No Object.hasOwn in all target environments we support.
23 Object.prototype.hasOwnProperty.call(setTimeout, 'clock')
24 )
25 } // istanbul ignore next
26
27 return false
28}
29
30configureDTL({
31 unstable_advanceTimersWrapper: cb => {

Callers 1

pure.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…