0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-21 21:19:50 +01:00
nodejs/test/parallel/test-runner-subtest-after-hook.js
cjihrig 3aa06589f1 test: add regression test for test_runner after hook
Refs: https://github.com/nodejs/node/issues/51997
PR-URL: https://github.com/nodejs/node/pull/51998
Fixes: https://github.com/nodejs/node/issues/51997
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2024-03-07 09:16:37 +00:00

13 lines
350 B
JavaScript

'use strict';
const common = require('../common');
const { test } = require('node:test');
// Regression test for https://github.com/nodejs/node/issues/51997
test('after hook should be called with no subtests', (t) => {
const timer = setTimeout(common.mustNotCall(), 2 ** 30);
t.after(common.mustCall(() => {
clearTimeout(timer);
}));
});