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: 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]>
  • Loading branch information
cjihrig authored and rdw-msft committed Mar 26, 2024
1 parent fda645a commit 9f17dc5
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 9f17dc5

Please sign in to comment.