diff --git a/lib/internal/test_runner/mock/mock_timers.js b/lib/internal/test_runner/mock/mock_timers.js index 94f9f00dee7c110..407a671eda7a8cd 100644 --- a/lib/internal/test_runner/mock/mock_timers.js +++ b/lib/internal/test_runner/mock/mock_timers.js @@ -265,7 +265,7 @@ class MockTimers { id: timerId, callback, runAt: this.#now + delay, - interval: isInterval, + interval: isInterval ? delay : undefined, args, }); @@ -621,7 +621,7 @@ class MockTimers { this.#executionQueue.shift(); - if (timer.interval) { + if (timer.interval !== undefined) { timer.runAt += timer.interval; this.#executionQueue.insert(timer); }