Skip to content

Commit 905c48f

Browse files
cjihrigrichardlau
authored andcommitted
test: add regression test for test_runner after hook
Refs: #51997 PR-URL: #51998 Fixes: #51997 Reviewed-By: Matthew Aitken <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
1 parent 51ea5b6 commit 905c48f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'use strict';
2+
const common = require('../common');
3+
const { test } = require('node:test');
4+
5+
// Regression test for https://github.com/nodejs/node/issues/51997
6+
test('after hook should be called with no subtests', (t) => {
7+
const timer = setTimeout(common.mustNotCall(), 2 ** 30);
8+
9+
t.after(common.mustCall(() => {
10+
clearTimeout(timer);
11+
}));
12+
});

0 commit comments

Comments
 (0)