node/test/fixtures/test-runner/root-duration.mjs
Colin Ihrig 592c6907bf
test_runner: avoid overwriting root start time
This commit ensures the root test start time is not overwritten
when top level before()/after() hooks are run.

PR-URL: https://github.com/nodejs/node/pull/52020
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-03-11 03:18:07 +00:00

8 lines
134 B
JavaScript

import { test, after } from 'node:test';
after(() => {});
test('a test with some delay', (t, done) => {
setTimeout(done, 50);
});