diff options
author | Benjamin Gruenbaum <benjamingr@gmail.com> | 2023-05-17 11:57:21 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-17 08:57:21 +0000 |
commit | 3cf05be50e02fd9e6933efda6cae7e21b8b531ea (patch) | |
tree | 2b1d25ee27a035fb043868b8252e427054f1c85d /test/parallel/test-runner-misc.js | |
parent | 5cb5422b6ff29018c915a497da0ce1a509e1d52c (diff) | |
download | node-new-3cf05be50e02fd9e6933efda6cae7e21b8b531ea.tar.gz |
test: fix suite signal
PR-URL: https://github.com/nodejs/node/pull/47800
Fixes: https://github.com/nodejs/node/issues/47882
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Diffstat (limited to 'test/parallel/test-runner-misc.js')
-rw-r--r-- | test/parallel/test-runner-misc.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/parallel/test-runner-misc.js b/test/parallel/test-runner-misc.js index 34abaf5c12..abc2715dcf 100644 --- a/test/parallel/test-runner-misc.js +++ b/test/parallel/test-runner-misc.js @@ -21,11 +21,19 @@ if (process.argv[2] === 'child') { })).finally(common.mustCall(() => { test(() => assert.strictEqual(testSignal.aborted, true)); })); + + // TODO(benjamingr) add more tests to describe + AbortSignal + // this just tests the parameter is passed + test.describe('Abort Signal in describe', common.mustCall(({ signal }) => { + test.it('Supports AbortSignal', () => { + assert.strictEqual(signal.aborted, false); + }); + })); } else assert.fail('unreachable'); } else { const child = spawnSync(process.execPath, [__filename, 'child', 'abortSignal']); const stdout = child.stdout.toString(); - assert.match(stdout, /^# pass 1$/m); + assert.match(stdout, /^# pass 2$/m); assert.match(stdout, /^# fail 0$/m); assert.match(stdout, /^# cancelled 1$/m); assert.strictEqual(child.status, 1); |