Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jest/fake-timers

Package Overview
Dependencies
Maintainers
6
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jest/fake-timers - npm Package Compare versions

Comparing version 29.4.3 to 29.5.0

4

build/index.d.ts

@@ -86,5 +86,9 @@ /**

runAllTimers(): void;
runAllTimersAsync(): Promise<void>;
runOnlyPendingTimers(): void;
runOnlyPendingTimersAsync(): Promise<void>;
advanceTimersToNextTimer(steps?: number): void;
advanceTimersToNextTimerAsync(steps?: number): Promise<void>;
advanceTimersByTime(msToRun: number): void;
advanceTimersByTimeAsync(msToRun: number): Promise<void>;
runAllTicks(): void;

@@ -91,0 +95,0 @@ useRealTimers(): void;

@@ -53,2 +53,7 @@ 'use strict';

}
async runAllTimersAsync() {
if (this._checkFakeTimers()) {
await this._clock.runAllAsync();
}
}
runOnlyPendingTimers() {

@@ -59,2 +64,7 @@ if (this._checkFakeTimers()) {

}
async runOnlyPendingTimersAsync() {
if (this._checkFakeTimers()) {
await this._clock.runToLastAsync();
}
}
advanceTimersToNextTimer(steps = 1) {

@@ -72,2 +82,14 @@ if (this._checkFakeTimers()) {

}
async advanceTimersToNextTimerAsync(steps = 1) {
if (this._checkFakeTimers()) {
for (let i = steps; i > 0; i--) {
await this._clock.nextAsync();
// Fire all timers at this point: https://github.com/sinonjs/fake-timers/issues/250
await this._clock.tickAsync(0);
if (this._clock.countTimers() === 0) {
break;
}
}
}
}
advanceTimersByTime(msToRun) {

@@ -78,2 +100,7 @@ if (this._checkFakeTimers()) {

}
async advanceTimersByTimeAsync(msToRun) {
if (this._checkFakeTimers()) {
await this._clock.tickAsync(msToRun);
}
}
runAllTicks() {

@@ -80,0 +107,0 @@ if (this._checkFakeTimers()) {

14

package.json
{
"name": "@jest/fake-timers",
"version": "29.4.3",
"version": "29.5.0",
"repository": {

@@ -20,11 +20,11 @@ "type": "git",

"dependencies": {
"@jest/types": "^29.4.3",
"@jest/types": "^29.5.0",
"@sinonjs/fake-timers": "^10.0.2",
"@types/node": "*",
"jest-message-util": "^29.4.3",
"jest-mock": "^29.4.3",
"jest-util": "^29.4.3"
"jest-message-util": "^29.5.0",
"jest-mock": "^29.5.0",
"jest-util": "^29.5.0"
},
"devDependencies": {
"@jest/test-utils": "^29.4.3",
"@jest/test-utils": "^29.5.0",
"@types/sinonjs__fake-timers": "^8.1.2"

@@ -38,3 +38,3 @@ },

},
"gitHead": "a49c88610e49a3242576160740a32a2fe11161e1"
"gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc