Skip to content

Commit 9f17dc5

Browse files
cjihrigrdw-msft
authored andcommitted
test: add regression test for test_runner after hook
Refs: nodejs#51997 PR-URL: nodejs#51998 Fixes: nodejs#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 fda645a commit 9f17dc5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
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)