@jest/fake-timers
Advanced tools
Comparing version 28.1.3 to 29.0.0-alpha.0
@@ -438,12 +438,4 @@ 'use strict'; | ||
_checkFakeTimers() { | ||
var _this$_fakeTimerAPIs; | ||
// @ts-expect-error: condition always returns 'true' | ||
if ( | ||
this._global.setTimeout !== | ||
((_this$_fakeTimerAPIs = this._fakeTimerAPIs) === null || | ||
_this$_fakeTimerAPIs === void 0 | ||
? void 0 | ||
: _this$_fakeTimerAPIs.setTimeout) | ||
) { | ||
if (this._global.setTimeout !== this._fakeTimerAPIs?.setTimeout) { | ||
this._global.console.warn( | ||
@@ -450,0 +442,0 @@ 'A function to advance timers was called but the timers APIs are not mocked ' + |
@@ -165,4 +165,2 @@ 'use strict'; | ||
_toSinonFakeTimersConfig(fakeTimersConfig = {}) { | ||
var _fakeTimersConfig$doN, _fakeTimersConfig$now; | ||
fakeTimersConfig = {...this._config.fakeTimers, ...fakeTimersConfig}; | ||
@@ -174,16 +172,9 @@ const advanceTimeDelta = | ||
const toFake = new Set(Object.keys(this._fakeTimers.timers)); | ||
(_fakeTimersConfig$doN = fakeTimersConfig.doNotFake) === null || | ||
_fakeTimersConfig$doN === void 0 | ||
? void 0 | ||
: _fakeTimersConfig$doN.forEach(nameOfFakeableAPI => { | ||
toFake.delete(nameOfFakeableAPI); | ||
}); | ||
fakeTimersConfig.doNotFake?.forEach(nameOfFakeableAPI => { | ||
toFake.delete(nameOfFakeableAPI); | ||
}); | ||
return { | ||
advanceTimeDelta, | ||
loopLimit: fakeTimersConfig.timerLimit || 100_000, | ||
now: | ||
(_fakeTimersConfig$now = fakeTimersConfig.now) !== null && | ||
_fakeTimersConfig$now !== void 0 | ||
? _fakeTimersConfig$now | ||
: Date.now(), | ||
now: fakeTimersConfig.now ?? Date.now(), | ||
shouldAdvanceTime: Boolean(fakeTimersConfig.advanceTimers), | ||
@@ -190,0 +181,0 @@ shouldClearNativeTimers: true, |
{ | ||
"name": "@jest/fake-timers", | ||
"version": "28.1.3", | ||
"version": "29.0.0-alpha.0", | ||
"repository": { | ||
@@ -20,15 +20,15 @@ "type": "git", | ||
"dependencies": { | ||
"@jest/types": "^28.1.3", | ||
"@jest/types": "^29.0.0-alpha.0", | ||
"@sinonjs/fake-timers": "^9.1.2", | ||
"@types/node": "*", | ||
"jest-message-util": "^28.1.3", | ||
"jest-mock": "^28.1.3", | ||
"jest-util": "^28.1.3" | ||
"jest-message-util": "^29.0.0-alpha.0", | ||
"jest-mock": "^29.0.0-alpha.0", | ||
"jest-util": "^29.0.0-alpha.0" | ||
}, | ||
"devDependencies": { | ||
"@jest/test-utils": "^28.1.3", | ||
"@jest/test-utils": "^29.0.0-alpha.0", | ||
"@types/sinonjs__fake-timers": "^8.1.2" | ||
}, | ||
"engines": { | ||
"node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" | ||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0" | ||
}, | ||
@@ -38,3 +38,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "2cce069800dab3fc8ca7c469b32d2e2b2f7e2bb1" | ||
"gitHead": "6862afb00307b52f32eedee977a9b3041355f184" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24773
779
2
+ Added@jest/schemas@29.6.3(transitive)
+ Added@jest/types@29.6.3(transitive)
+ Added@sinclair/typebox@0.27.8(transitive)
+ Addedjest-message-util@29.7.0(transitive)
+ Addedjest-mock@29.7.0(transitive)
+ Addedjest-util@29.7.0(transitive)
+ Addedpretty-format@29.7.0(transitive)
- Removed@jest/schemas@28.1.3(transitive)
- Removed@jest/types@28.1.3(transitive)
- Removed@sinclair/typebox@0.24.51(transitive)
- Removedansi-regex@5.0.1(transitive)
- Removedjest-message-util@28.1.3(transitive)
- Removedjest-mock@28.1.3(transitive)
- Removedjest-util@28.1.3(transitive)
- Removedpretty-format@28.1.3(transitive)
Updated@jest/types@^29.0.0-alpha.0
Updatedjest-mock@^29.0.0-alpha.0
Updatedjest-util@^29.0.0-alpha.0