1const {test, afterEach} = require('node:test'); 2const assert = require('node:assert'); 3const {waitForAbort} = require("./wait-for-abort-helper"); 4 5let testCount = 0; 6let signal; 7 8afterEach(() => { 9 assert.equal(signal.aborted, false); 10 11 waitForAbort({ testNumber: ++testCount, signal }); 12}); 13 14test("sync", (t) => { 15 signal = t.signal; 16 assert.equal(signal.aborted, false); 17}); 18 19test("async", async (t) => { 20 await null; 21 signal = t.signal; 22 assert.equal(signal.aborted, false); 23}); 24