Skip to content

Commit bee3b36

Browse files
cjihrigtargos
authored andcommitted
test: add regression test for test_runner after hook
Refs: #51997 PR-URL: #51998 Fixes: #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>
1 parent 85aa6ca commit bee3b36

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)