From 248fe80b5b905b75f5de68167ff443ccedfed861 Mon Sep 17 00:00:00 2001 From: Erick Wendel Date: Tue, 15 Oct 2024 18:08:40 -0300 Subject: [PATCH 1/2] test_runner: mark mockTimers as stable --- doc/api/test.md | 2 +- lib/internal/test_runner/mock/mock_timers.js | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/doc/api/test.md b/doc/api/test.md index d7fbb5c69b9358..b9dbdd4d914707 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -2224,7 +2224,7 @@ added: - v18.19.0 --> -> Stability: 1 - Experimental +> Stability: 2 - Stable Mocking timers is a technique commonly used in software testing to simulate and control the behavior of timers, such as `setInterval` and `setTimeout`, diff --git a/lib/internal/test_runner/mock/mock_timers.js b/lib/internal/test_runner/mock/mock_timers.js index 935a419d83d0e4..66375c6688e038 100644 --- a/lib/internal/test_runner/mock/mock_timers.js +++ b/lib/internal/test_runner/mock/mock_timers.js @@ -27,9 +27,6 @@ const { validateStringArray, } = require('internal/validators'); -const { - emitExperimentalWarning, -} = require('internal/util'); const { AbortError, codes: { @@ -133,10 +130,6 @@ class MockTimers { #clearInterval = FunctionPrototypeBind(this.#clearTimer, this); #clearImmediate = FunctionPrototypeBind(this.#clearTimer, this); - constructor() { - emitExperimentalWarning('The MockTimers API'); - } - #restoreSetImmediate() { ObjectDefineProperty( globalThis, From 613f3cc793665a6a076f5ef682a3dd2cca0c13a0 Mon Sep 17 00:00:00 2001 From: Erick Wendel Date: Wed, 16 Oct 2024 10:22:36 -0300 Subject: [PATCH 2/2] doc: add changelog for mocktimers Signed-off-by: Erick Wendel --- doc/api/test.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/api/test.md b/doc/api/test.md index b9dbdd4d914707..ca16d5b309c82a 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -2222,6 +2222,10 @@ set to `true`. added: - v20.4.0 - v18.19.0 +changes: + - version: REPLACEME + pr-url: https://github.com/nodejs/node/pull/55398 + description: The Mock Timers is now stable. --> > Stability: 2 - Stable