11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_cirequire('../common'); 31cb0ef41Sopenharmony_ciconst assert = require('assert'); 41cb0ef41Sopenharmony_ciconst test = require('node:test'); 51cb0ef41Sopenharmony_ci 61cb0ef41Sopenharmony_ci[Symbol(), {}, [], () => {}, 1n, true, '1'].forEach((timeout) => { 71cb0ef41Sopenharmony_ci assert.throws(() => test({ timeout }), { code: 'ERR_INVALID_ARG_TYPE' }); 81cb0ef41Sopenharmony_ci}); 91cb0ef41Sopenharmony_ci[-1, -Infinity, NaN, 2 ** 33, Number.MAX_SAFE_INTEGER].forEach((timeout) => { 101cb0ef41Sopenharmony_ci assert.throws(() => test({ timeout }), { code: 'ERR_OUT_OF_RANGE' }); 111cb0ef41Sopenharmony_ci}); 121cb0ef41Sopenharmony_ci[null, undefined, Infinity, 0, 1, 1.1].forEach((timeout) => { 131cb0ef41Sopenharmony_ci // Valid values should not throw. 141cb0ef41Sopenharmony_ci test({ timeout }); 151cb0ef41Sopenharmony_ci}); 161cb0ef41Sopenharmony_ci 171cb0ef41Sopenharmony_ci[Symbol(), {}, [], () => {}, 1n, '1'].forEach((concurrency) => { 181cb0ef41Sopenharmony_ci assert.throws(() => test({ concurrency }), { code: 'ERR_INVALID_ARG_TYPE' }); 191cb0ef41Sopenharmony_ci}); 201cb0ef41Sopenharmony_ci[-1, 0, 1.1, -Infinity, NaN, 2 ** 33, Number.MAX_SAFE_INTEGER].forEach((concurrency) => { 211cb0ef41Sopenharmony_ci assert.throws(() => test({ concurrency }), { code: 'ERR_OUT_OF_RANGE' }); 221cb0ef41Sopenharmony_ci}); 231cb0ef41Sopenharmony_ci[null, undefined, 1, 2 ** 31, true, false].forEach((concurrency) => { 241cb0ef41Sopenharmony_ci // Valid values should not throw. 251cb0ef41Sopenharmony_ci test({ concurrency }); 261cb0ef41Sopenharmony_ci}); 27