11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_cirequire('../common'); 31cb0ef41Sopenharmony_ciconst fixtures = require('../common/fixtures'); 41cb0ef41Sopenharmony_ciconst assert = require('node:assert'); 51cb0ef41Sopenharmony_ciconst { spawnSync } = require('node:child_process'); 61cb0ef41Sopenharmony_ciconst { test } = require('node:test'); 71cb0ef41Sopenharmony_ciconst cwd = fixtures.path('test-runner', 'default-behavior'); 81cb0ef41Sopenharmony_ciconst env = { ...process.env, 'NODE_DEBUG': 'test_runner' }; 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_citest('default concurrency', async () => { 111cb0ef41Sopenharmony_ci const args = ['--test']; 121cb0ef41Sopenharmony_ci const cp = spawnSync(process.execPath, args, { cwd, env }); 131cb0ef41Sopenharmony_ci assert.match(cp.stderr.toString(), /concurrency: true,/); 141cb0ef41Sopenharmony_ci}); 151cb0ef41Sopenharmony_ci 161cb0ef41Sopenharmony_citest('concurrency of one', async () => { 171cb0ef41Sopenharmony_ci const args = ['--test', '--test-concurrency=1']; 181cb0ef41Sopenharmony_ci const cp = spawnSync(process.execPath, args, { cwd, env }); 191cb0ef41Sopenharmony_ci assert.match(cp.stderr.toString(), /concurrency: 1,/); 201cb0ef41Sopenharmony_ci}); 211cb0ef41Sopenharmony_ci 221cb0ef41Sopenharmony_citest('concurrency of two', async () => { 231cb0ef41Sopenharmony_ci const args = ['--test', '--test-concurrency=2']; 241cb0ef41Sopenharmony_ci const cp = spawnSync(process.execPath, args, { cwd, env }); 251cb0ef41Sopenharmony_ci assert.match(cp.stderr.toString(), /concurrency: 2,/); 261cb0ef41Sopenharmony_ci}); 27