From 1bb2d08aed98af4f0531814f303ecf43407d7539 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Thu, 28 Sep 2023 19:32:49 -0400 Subject: [PATCH] test_runner: replace spurious if with else There is an `if` statement that likely should have been an `else` in the original PR. Refs: https://github.com/nodejs/node/pull/48915 --- lib/internal/test_runner/test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/test_runner/test.js b/lib/internal/test_runner/test.js index 4afb93f4a60df0..4eb02c5d4e3118 100644 --- a/lib/internal/test_runner/test.js +++ b/lib/internal/test_runner/test.js @@ -86,7 +86,7 @@ function stopTest(timeout, signal) { if (timeout === kDefaultTimeout) { disposeFunction = abortListener[SymbolDispose]; - } if (timeout !== kDefaultTimeout) { + } else { timer = setTimeout(() => deferred.resolve(), timeout); timer.unref();