11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_cirequire('../common'); 31cb0ef41Sopenharmony_ciconst fixtures = require('../common/fixtures'); 41cb0ef41Sopenharmony_ciconst assert = require('assert'); 51cb0ef41Sopenharmony_ciconst { spawnSync } = require('child_process'); 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ci{ 81cb0ef41Sopenharmony_ci const child = spawnSync(process.execPath, [ 91cb0ef41Sopenharmony_ci '--test', 101cb0ef41Sopenharmony_ci fixtures.path('test-runner', 'extraneous_set_immediate_async.mjs'), 111cb0ef41Sopenharmony_ci ]); 121cb0ef41Sopenharmony_ci const stdout = child.stdout.toString(); 131cb0ef41Sopenharmony_ci assert.match(stdout, /^# Warning: Test "extraneous async activity test" generated asynchronous activity after the test ended/m); 141cb0ef41Sopenharmony_ci assert.match(stdout, /^# pass 1/m); 151cb0ef41Sopenharmony_ci assert.match(stdout, /^# fail 1$/m); 161cb0ef41Sopenharmony_ci assert.match(stdout, /^# cancelled 0$/m); 171cb0ef41Sopenharmony_ci assert.strictEqual(child.status, 1); 181cb0ef41Sopenharmony_ci assert.strictEqual(child.signal, null); 191cb0ef41Sopenharmony_ci} 201cb0ef41Sopenharmony_ci 211cb0ef41Sopenharmony_ci{ 221cb0ef41Sopenharmony_ci const child = spawnSync(process.execPath, [ 231cb0ef41Sopenharmony_ci '--test', 241cb0ef41Sopenharmony_ci fixtures.path('test-runner', 'extraneous_set_timeout_async.mjs'), 251cb0ef41Sopenharmony_ci ]); 261cb0ef41Sopenharmony_ci const stdout = child.stdout.toString(); 271cb0ef41Sopenharmony_ci assert.match(stdout, /^# Warning: Test "extraneous async activity test" generated asynchronous activity after the test ended/m); 281cb0ef41Sopenharmony_ci assert.match(stdout, /^# pass 1$/m); 291cb0ef41Sopenharmony_ci assert.match(stdout, /^# fail 1$/m); 301cb0ef41Sopenharmony_ci assert.match(stdout, /^# cancelled 0$/m); 311cb0ef41Sopenharmony_ci assert.strictEqual(child.status, 1); 321cb0ef41Sopenharmony_ci assert.strictEqual(child.signal, null); 331cb0ef41Sopenharmony_ci} 34