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
PR-URL: https://github.com/nodejs/node/pull/49943
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
This commit is contained in:
Colin Ihrig 2023-09-29 07:04:58 -04:00 committed by GitHub
parent 43500fa646
commit c935d4c8fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,7 +86,7 @@ function stopTest(timeout, signal) {
if (timeout === kDefaultTimeout) { if (timeout === kDefaultTimeout) {
disposeFunction = abortListener[SymbolDispose]; disposeFunction = abortListener[SymbolDispose];
} if (timeout !== kDefaultTimeout) { } else {
timer = setTimeout(() => deferred.resolve(), timeout); timer = setTimeout(() => deferred.resolve(), timeout);
timer.unref(); timer.unref();