diff --git a/lib/internal/test_runner/test.js b/lib/internal/test_runner/test.js index 97d53c097261d7..663d314a016a68 100644 --- a/lib/internal/test_runner/test.js +++ b/lib/internal/test_runner/test.js @@ -149,7 +149,7 @@ function stopTest(timeout, signal) { disposeFunction = () => { abortListener[SymbolDispose](); - clearTimeout(timer); + timer[SymbolDispose](); }; } @@ -679,7 +679,7 @@ class Test extends AsyncResource { this.expectedAssertions = plan; this.cancelled = false; this.expectFailure = parseExpectFailure(expectFailure) || this.parent?.expectFailure; - this.skipped = skip !== undefined && skip !== false; + this.skipped = !!skip; this.isTodo = (todo !== undefined && todo !== false) || this.parent?.isTodo; this.startTime = null; this.endTime = null; diff --git a/test/parallel/test-runner-skip-empty-string.js b/test/parallel/test-runner-skip-empty-string.js new file mode 100644 index 00000000000000..03352ce9a475e8 --- /dev/null +++ b/test/parallel/test-runner-skip-empty-string.js @@ -0,0 +1,6 @@ +'use strict'; + +const common = require('../common'); +const { test } = require('node:test'); + +test('skip option empty string should not skip', { skip: '' }, common.mustCall());