11cb0ef41Sopenharmony_ciconst {test, afterEach} = require('node:test'); 21cb0ef41Sopenharmony_ciconst assert = require('node:assert'); 31cb0ef41Sopenharmony_ciconst { waitForAbort } = require('./wait-for-abort-helper'); 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_cilet testCount = 0; 61cb0ef41Sopenharmony_cilet signal; 71cb0ef41Sopenharmony_ci 81cb0ef41Sopenharmony_ciafterEach(() => { 91cb0ef41Sopenharmony_ci assert.equal(signal.aborted, false); 101cb0ef41Sopenharmony_ci 111cb0ef41Sopenharmony_ci waitForAbort({ testNumber: ++testCount, signal }); 121cb0ef41Sopenharmony_ci}); 131cb0ef41Sopenharmony_ci 141cb0ef41Sopenharmony_citest("sync", (t) => { 151cb0ef41Sopenharmony_ci signal = t.signal; 161cb0ef41Sopenharmony_ci assert.equal(signal.aborted, false); 171cb0ef41Sopenharmony_ci throw new Error('failing the sync test'); 181cb0ef41Sopenharmony_ci}); 191cb0ef41Sopenharmony_ci 201cb0ef41Sopenharmony_citest("async", async (t) => { 211cb0ef41Sopenharmony_ci await null; 221cb0ef41Sopenharmony_ci signal = t.signal; 231cb0ef41Sopenharmony_ci assert.equal(signal.aborted, false); 241cb0ef41Sopenharmony_ci throw new Error('failing the async test'); 251cb0ef41Sopenharmony_ci}); 26