Skip to content

Commit

Permalink
test: add regression test for test_runner after hook
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
cjihrig authored and richardlau committed Mar 25, 2024
1 parent 51ea5b6 commit 905c48f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/parallel/test-runner-subtest-after-hook.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'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);
}));
});

0 comments on commit 905c48f

Please sign in to comment.