node/test/fixtures/test-runner/output/async-test-scheduling.mjs
Colin Ihrig b5740756ca
test_runner: reland run global after() hook earlier
This commit reverts the revert in
bb52656fc6. It also includes the
fix for the issue that required the revert
(https://github.com/nodejs/node/pull/49059#issuecomment-1675171959)
and an additional common.mustCall() in the added test.

Refs: https://github.com/nodejs/node/pull/49059
Refs: https://github.com/nodejs/node/pull/49110
PR-URL: https://github.com/nodejs/node/pull/49116
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-08-14 14:29:29 +00:00

13 lines
407 B
JavaScript

import * as common from '../../../common/index.mjs';
import { describe, test } from 'node:test';
import { setTimeout } from 'node:timers/promises';
test('test', common.mustCall());
describe('suite', common.mustCall(async () => {
test('test', common.mustCall());
await setTimeout(10);
test('scheduled async', common.mustCall());
}));
await setTimeout(10);
test('scheduled async', common.mustCall());