diff --git a/test/eslint.config_partial.mjs b/test/eslint.config_partial.mjs index 6ecb2405547889..9bd5aa2eb67e6f 100644 --- a/test/eslint.config_partial.mjs +++ b/test/eslint.config_partial.mjs @@ -148,7 +148,6 @@ export default [ files: [ 'test/es-module/**/*.{js,mjs}', 'test/parallel/**/*.{js,mjs}', - 'test/sequential/**/*.{js,mjs}', ], rules: { '@stylistic/js/comma-dangle': [ @@ -163,6 +162,23 @@ export default [ ], }, }, + { + files: [ + 'test/sequential/**/*.{js,mjs}', + ], + rules: { + '@stylistic/js/comma-dangle': [ + 'error', + { + arrays: 'always-multiline', + exports: 'always-multiline', + functions: 'only-multiline', + imports: 'always-multiline', + objects: 'always-multiline', + }, + ], + }, + }, { files: [ 'test/{common,fixtures,wpt}/**/*.{js,mjs,cjs}', diff --git a/test/sequential/test-child-process-execsync.js b/test/sequential/test-child-process-execsync.js index ed7f78d421112f..a7f28b79f453e8 100644 --- a/test/sequential/test-child-process-execsync.js +++ b/test/sequential/test-child-process-execsync.js @@ -156,5 +156,5 @@ const args = [ // Verify the shell option works properly execFileSync(`"${common.isWindows ? process.execPath : '$NODE'}"`, [], { - encoding: 'utf8', shell: true, env + encoding: 'utf8', shell: true, env, }); diff --git a/test/sequential/test-child-process-exit.js b/test/sequential/test-child-process-exit.js index 318b6451dd4e30..54dc6c1c90f984 100644 --- a/test/sequential/test-child-process-exit.js +++ b/test/sequential/test-child-process-exit.js @@ -40,7 +40,7 @@ if (gen === maxGen) { } const child = ch.spawn(process.execPath, [__filename, gen + 1], { - stdio: [ 'ignore', 'pipe', 'ignore' ] + stdio: [ 'ignore', 'pipe', 'ignore' ], }); assert.ok(!child.stdin); assert.ok(child.stdout); diff --git a/test/sequential/test-cli-syntax-require.js b/test/sequential/test-cli-syntax-require.js index 5572379f15bc97..f35ad90e00a5ea 100644 --- a/test/sequential/test-cli-syntax-require.js +++ b/test/sequential/test-cli-syntax-require.js @@ -28,7 +28,7 @@ const syntaxErrorRE = /^SyntaxError: \b/m; // stderr should include the filename assert(output.startsWith(file), `${output} starts with ${file}`); - } + }, }); }); }); diff --git a/test/sequential/test-cluster-inspect-brk.js b/test/sequential/test-cluster-inspect-brk.js index fbae27f9ba4eb4..c512a3b0e958cb 100644 --- a/test/sequential/test-cluster-inspect-brk.js +++ b/test/sequential/test-cluster-inspect-brk.js @@ -14,7 +14,7 @@ if (cluster.isPrimary) { cluster.setupPrimary({ execArgv: execArgv, - stdio: ['pipe', 'pipe', 'pipe', 'ipc', 'pipe'] + stdio: ['pipe', 'pipe', 'pipe', 'ipc', 'pipe'], }); const worker = cluster.fork(); diff --git a/test/sequential/test-cpu-prof-default.js b/test/sequential/test-cpu-prof-default.js index 12c4bc05bb9c3c..efd929469a6a32 100644 --- a/test/sequential/test-cpu-prof-default.js +++ b/test/sequential/test-cpu-prof-default.js @@ -15,7 +15,7 @@ const { spawnSync } = require('child_process'); const tmpdir = require('../common/tmpdir'); const { getCpuProfiles, - env + env, } = require('../common/cpu-prof'); { @@ -25,7 +25,7 @@ const { fixtures.path('workload', 'fibonacci.js'), ], { cwd: tmpdir.path, - env + env, }); if (output.status !== 0) { console.log(output.stderr.toString()); diff --git a/test/sequential/test-cpu-prof-dir-absolute.js b/test/sequential/test-cpu-prof-dir-absolute.js index 03d7f50865b650..1747ba3b1f1123 100644 --- a/test/sequential/test-cpu-prof-dir-absolute.js +++ b/test/sequential/test-cpu-prof-dir-absolute.js @@ -15,7 +15,7 @@ const { getCpuProfiles, kCpuProfInterval, env, - verifyFrames + verifyFrames, } = require('../common/cpu-prof'); // relative --cpu-prof-dir @@ -31,7 +31,7 @@ const { fixtures.path('workload', 'fibonacci.js'), ], { cwd: tmpdir.path, - env + env, }); if (output.status !== 0) { console.log(output.stderr.toString()); diff --git a/test/sequential/test-cpu-prof-dir-and-name.js b/test/sequential/test-cpu-prof-dir-and-name.js index 84af5d8212065d..17395e678f35fc 100644 --- a/test/sequential/test-cpu-prof-dir-and-name.js +++ b/test/sequential/test-cpu-prof-dir-and-name.js @@ -16,7 +16,7 @@ const { getCpuProfiles, kCpuProfInterval, env, - verifyFrames + verifyFrames, } = require('../common/cpu-prof'); { @@ -34,7 +34,7 @@ const { fixtures.path('workload', 'fibonacci.js'), ], { cwd: tmpdir.path, - env + env, }); if (output.status !== 0) { console.log(output.stderr.toString()); diff --git a/test/sequential/test-cpu-prof-dir-relative.js b/test/sequential/test-cpu-prof-dir-relative.js index ac8c46486feae5..89684ae1c24b73 100644 --- a/test/sequential/test-cpu-prof-dir-relative.js +++ b/test/sequential/test-cpu-prof-dir-relative.js @@ -15,7 +15,7 @@ const { getCpuProfiles, kCpuProfInterval, env, - verifyFrames + verifyFrames, } = require('../common/cpu-prof'); // relative --cpu-prof-dir @@ -30,7 +30,7 @@ const { fixtures.path('workload', 'fibonacci.js'), ], { cwd: tmpdir.path, - env + env, }); if (output.status !== 0) { console.log(output.stderr.toString()); diff --git a/test/sequential/test-cpu-prof-dir-worker.js b/test/sequential/test-cpu-prof-dir-worker.js index 22c7f79deb2fca..dd827414c5fe83 100644 --- a/test/sequential/test-cpu-prof-dir-worker.js +++ b/test/sequential/test-cpu-prof-dir-worker.js @@ -15,7 +15,7 @@ const { getCpuProfiles, kCpuProfInterval, env, - getFrames + getFrames, } = require('../common/cpu-prof'); // --cpu-prof-dir with worker @@ -30,7 +30,7 @@ const { fixtures.path('workload', 'fibonacci-worker.js'), ], { cwd: tmpdir.path, - env + env, }); if (output.status !== 0) { console.log(output.stderr.toString()); diff --git a/test/sequential/test-cpu-prof-drained.js b/test/sequential/test-cpu-prof-drained.js index 5be4d1a919eec0..d71255a6a75fb5 100644 --- a/test/sequential/test-cpu-prof-drained.js +++ b/test/sequential/test-cpu-prof-drained.js @@ -16,7 +16,7 @@ const { getCpuProfiles, kCpuProfInterval, env, - verifyFrames + verifyFrames, } = require('../common/cpu-prof'); { @@ -28,7 +28,7 @@ const { fixtures.path('workload', 'fibonacci.js'), ], { cwd: tmpdir.path, - env + env, }); if (output.status !== 0) { console.log(output.stderr.toString()); diff --git a/test/sequential/test-cpu-prof-exit.js b/test/sequential/test-cpu-prof-exit.js index 34b1acff4b8f99..403af352dfeea5 100644 --- a/test/sequential/test-cpu-prof-exit.js +++ b/test/sequential/test-cpu-prof-exit.js @@ -15,7 +15,7 @@ const { getCpuProfiles, kCpuProfInterval, env, - verifyFrames + verifyFrames, } = require('../common/cpu-prof'); { @@ -27,7 +27,7 @@ const { fixtures.path('workload', 'fibonacci-exit.js'), ], { cwd: tmpdir.path, - env + env, }); if (output.status !== 55) { console.log(output.stderr.toString()); diff --git a/test/sequential/test-cpu-prof-invalid-options.js b/test/sequential/test-cpu-prof-invalid-options.js index d63716941f78cf..5106dea6f7ba17 100644 --- a/test/sequential/test-cpu-prof-invalid-options.js +++ b/test/sequential/test-cpu-prof-invalid-options.js @@ -12,7 +12,7 @@ const { spawnSync } = require('child_process'); const tmpdir = require('../common/tmpdir'); const { kCpuProfInterval, - env + env, } = require('../common/cpu-prof'); // --cpu-prof-name without --cpu-prof @@ -24,7 +24,7 @@ const { fixtures.path('workload', 'fibonacci.js'), ], { cwd: tmpdir.path, - env + env, }); const stderr = output.stderr.toString().trim(); if (output.status !== 9) { @@ -45,7 +45,7 @@ const { fixtures.path('workload', 'fibonacci.js'), ], { cwd: tmpdir.path, - env + env, }); const stderr = output.stderr.toString().trim(); if (output.status !== 9) { @@ -66,7 +66,7 @@ for (const arg of [kCpuProfInterval, 'crashme']) { fixtures.path('workload', 'fibonacci.js'), ], { cwd: tmpdir.path, - env + env, }); const stderr = output.stderr.toString().trim(); if (output.status !== 9) { diff --git a/test/sequential/test-cpu-prof-kill.js b/test/sequential/test-cpu-prof-kill.js index cee66a62569bc8..8d37e7fbfa53b2 100644 --- a/test/sequential/test-cpu-prof-kill.js +++ b/test/sequential/test-cpu-prof-kill.js @@ -15,7 +15,7 @@ const { getCpuProfiles, kCpuProfInterval, env, - verifyFrames + verifyFrames, } = require('../common/cpu-prof'); { @@ -27,7 +27,7 @@ const { fixtures.path('workload', 'fibonacci-sigint.js'), ], { cwd: tmpdir.path, - env + env, }); if (!common.isWindows) { if (output.signal !== 'SIGINT') { diff --git a/test/sequential/test-cpu-prof-name.js b/test/sequential/test-cpu-prof-name.js index f40e639e92f624..f79c3af8eedae9 100644 --- a/test/sequential/test-cpu-prof-name.js +++ b/test/sequential/test-cpu-prof-name.js @@ -17,7 +17,7 @@ const { getCpuProfiles, kCpuProfInterval, env, - verifyFrames + verifyFrames, } = require('../common/cpu-prof'); // --cpu-prof-name @@ -33,7 +33,7 @@ const { fixtures.path('workload', 'fibonacci.js'), ], { cwd: tmpdir.path, - env + env, }); if (output.status !== 0) { console.log(output.stderr.toString()); @@ -60,7 +60,7 @@ const { fixtures.path('workload', 'fibonacci.js'), ], { cwd: dir, - env + env, }); if (output.status !== 0) { diff --git a/test/sequential/test-cpu-prof-worker-argv.js b/test/sequential/test-cpu-prof-worker-argv.js index ad88a2eeb08f0d..37af0b95b7ea42 100644 --- a/test/sequential/test-cpu-prof-worker-argv.js +++ b/test/sequential/test-cpu-prof-worker-argv.js @@ -14,7 +14,7 @@ const tmpdir = require('../common/tmpdir'); const { getCpuProfiles, kCpuProfInterval, - verifyFrames + verifyFrames, } = require('../common/cpu-prof'); { @@ -25,8 +25,8 @@ const { cwd: tmpdir.path, env: { ...process.env, - CPU_PROF_INTERVAL: kCpuProfInterval - } + CPU_PROF_INTERVAL: kCpuProfInterval, + }, }); if (output.status !== 0) { console.log(output.stderr.toString()); diff --git a/test/sequential/test-crypto-timing-safe-equal.js b/test/sequential/test-crypto-timing-safe-equal.js index 74ae39fbafcd0c..2025291daa0ffc 100644 --- a/test/sequential/test-crypto-timing-safe-equal.js +++ b/test/sequential/test-crypto-timing-safe-equal.js @@ -51,20 +51,20 @@ assert.strictEqual( test(new Float32Array([NaN]), new Float32Array([NaN]), { equal: false, sameValue: true, - timingSafeEqual: true + timingSafeEqual: true, }); test(new Float64Array([0]), new Float64Array([-0]), { equal: true, sameValue: false, - timingSafeEqual: false + timingSafeEqual: false, }); const x = new BigInt64Array([0x7ff0000000000001n, 0xfff0000000000001n]); test(new Float64Array(x.buffer), new Float64Array([NaN, NaN]), { equal: false, sameValue: true, - timingSafeEqual: false + timingSafeEqual: false, }); } @@ -73,7 +73,7 @@ assert.throws( { code: 'ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH', name: 'RangeError', - message: 'Input buffers must have the same byte length' + message: 'Input buffers must have the same byte length', } ); diff --git a/test/sequential/test-diagnostic-dir-cpu-prof.js b/test/sequential/test-diagnostic-dir-cpu-prof.js index 75f1d86ef4b2b5..cb98a92eaf4037 100644 --- a/test/sequential/test-diagnostic-dir-cpu-prof.js +++ b/test/sequential/test-diagnostic-dir-cpu-prof.js @@ -16,7 +16,7 @@ const { getCpuProfiles, kCpuProfInterval, env, - verifyFrames + verifyFrames, } = require('../common/cpu-prof'); // Test --diagnostic-dir changes the default for --cpu-prof @@ -33,7 +33,7 @@ const { fixtures.path('workload', 'fibonacci.js'), ], { cwd: tmpdir.path, - env + env, }); if (output.status !== 0) { console.log(output.stderr.toString()); @@ -62,7 +62,7 @@ const { fixtures.path('workload', 'fibonacci.js'), ], { cwd: tmpdir.path, - env + env, }); if (output.status !== 0) { console.log(output.stderr.toString()); diff --git a/test/sequential/test-diagnostic-dir-heap-prof.js b/test/sequential/test-diagnostic-dir-heap-prof.js index c74c075724185d..ad08f3463bc779 100644 --- a/test/sequential/test-diagnostic-dir-heap-prof.js +++ b/test/sequential/test-diagnostic-dir-heap-prof.js @@ -53,7 +53,7 @@ const TEST_ALLOCATION = kHeapProfInterval * 2; const env = { ...process.env, TEST_ALLOCATION, - NODE_DEBUG_NATIVE: 'INSPECTOR_PROFILER' + NODE_DEBUG_NATIVE: 'INSPECTOR_PROFILER', }; function getHeapProfiles(dir) { @@ -76,7 +76,7 @@ function getHeapProfiles(dir) { fixtures.path('workload', 'allocation.js'), ], { cwd: tmpdir.path, - env + env, }); if (output.status !== 0) { console.log(output.stderr.toString()); @@ -104,7 +104,7 @@ function getHeapProfiles(dir) { fixtures.path('workload', 'allocation.js'), ], { cwd: tmpdir.path, - env + env, }); if (output.status !== 0) { console.log(output.stderr.toString()); diff --git a/test/sequential/test-error-serdes.js b/test/sequential/test-error-serdes.js index 1a4ec1592bdc81..acd08903efab54 100644 --- a/test/sequential/test-error-serdes.js +++ b/test/sequential/test-error-serdes.js @@ -126,7 +126,7 @@ const data = { foo: 'bar', [inspect.custom]() { return 'barbaz'; - } + }, }; assert.strictEqual(inspect(cycle(data)), 'barbaz'); diff --git a/test/sequential/test-gc-http-client-onerror.js b/test/sequential/test-gc-http-client-onerror.js index 95e65ae0db6721..1c311c6a9b64a3 100644 --- a/test/sequential/test-gc-http-client-onerror.js +++ b/test/sequential/test-gc-http-client-onerror.js @@ -37,7 +37,7 @@ function getAll(requestsRemaining) { const req = http.get({ hostname: 'localhost', pathname: '/', - port: server.address().port + port: server.address().port, }, cb).on('error', onerror); count++; diff --git a/test/sequential/test-gc-http-client-timeout.js b/test/sequential/test-gc-http-client-timeout.js index e88578e765a7c7..bd5589fca1098f 100644 --- a/test/sequential/test-gc-http-client-timeout.js +++ b/test/sequential/test-gc-http-client-timeout.js @@ -30,7 +30,7 @@ function getAll(requestsRemaining) { const req = http.get({ hostname: 'localhost', pathname: '/', - port: server.address().port + port: server.address().port, }, cb); req.setTimeout(10, common.mustCall()); diff --git a/test/sequential/test-gc-http-client.js b/test/sequential/test-gc-http-client.js index b072d2c179b0e8..6b2a5fc03afbf3 100644 --- a/test/sequential/test-gc-http-client.js +++ b/test/sequential/test-gc-http-client.js @@ -35,7 +35,7 @@ function getAll(requestsRemaining) { const req = http.get({ hostname: 'localhost', pathname: '/', - port: server.address().port + port: server.address().port, }, cb); count++; diff --git a/test/sequential/test-get-heapsnapshot-options.js b/test/sequential/test-get-heapsnapshot-options.js index 91ba6112722ed5..96862ac367a72a 100644 --- a/test/sequential/test-get-heapsnapshot-options.js +++ b/test/sequential/test-get-heapsnapshot-options.js @@ -29,7 +29,7 @@ for (let i = 0; i < tests.cases.length; ++i) { process.execPath, ['--expose-internals', __filename, 'child', i + ''], { - cwd: tmpdir.path + cwd: tmpdir.path, }); const stderr = child.stderr.toString(); const stdout = child.stdout.toString(); diff --git a/test/sequential/test-heapdump.js b/test/sequential/test-heapdump.js index 013da83125313c..55b14ff9478a7d 100644 --- a/test/sequential/test-heapdump.js +++ b/test/sequential/test-heapdump.js @@ -46,7 +46,7 @@ process.chdir(tmpdir.path); name: 'TypeError', message: 'The "path" argument must be of type string or an instance of ' + 'Buffer or URL.' + - common.invalidArgTypeHelper(i) + common.invalidArgTypeHelper(i), }); }); @@ -55,7 +55,7 @@ process.chdir(tmpdir.path); code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError', message: 'The "options" argument must be of type object.' + - common.invalidArgTypeHelper(i) + common.invalidArgTypeHelper(i), }); }); @@ -64,7 +64,7 @@ process.chdir(tmpdir.path); code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError', message: 'The "options" argument must be of type object.' + - common.invalidArgTypeHelper(i) + common.invalidArgTypeHelper(i), }); }); diff --git a/test/sequential/test-http-econnrefused.js b/test/sequential/test-http-econnrefused.js index e326357a51f3d7..9c4f0b48531da5 100644 --- a/test/sequential/test-http-econnrefused.js +++ b/test/sequential/test-http-econnrefused.js @@ -106,7 +106,7 @@ function ping() { const opt = { port: common.PORT, path: '/ping', - method: 'POST' + method: 'POST', }; const req = http.request(opt, common.mustCallAtLeast((res) => { diff --git a/test/sequential/test-http-keep-alive-large-write.js b/test/sequential/test-http-keep-alive-large-write.js index 18079ab133f08f..68dc4927cf50f6 100644 --- a/test/sequential/test-http-keep-alive-large-write.js +++ b/test/sequential/test-http-keep-alive-large-write.js @@ -17,7 +17,7 @@ const server = http.createServer(common.mustCall((req, res) => { res.writeHead(200, { 'Content-Type': 'application/octet-stream', 'Content-Length': content.length.toString(), - 'Vary': 'Accept-Encoding' + 'Vary': 'Accept-Encoding', }); socket = res.socket; @@ -36,7 +36,7 @@ server.on('timeout', common.mustCallAtLeast(() => { server.listen(0, common.mustCall(() => { http.get({ path: '/', - port: server.address().port + port: server.address().port, }, (res) => { res.once('data', () => { socket._onTimeout(); diff --git a/test/sequential/test-http-keepalive-maxsockets.js b/test/sequential/test-http-keepalive-maxsockets.js index a9775e88ad8972..a999c9c127e07d 100644 --- a/test/sequential/test-http-keepalive-maxsockets.js +++ b/test/sequential/test-http-keepalive-maxsockets.js @@ -37,7 +37,7 @@ server.listen(0, common.mustCall(() => { const agent = http.Agent({ keepAlive: true, maxSockets: 5, - maxFreeSockets: 2 + maxFreeSockets: 2, }); let closed = false; @@ -83,7 +83,7 @@ server.listen(0, common.mustCall(() => { http.request({ port: server.address().port, path: `/${i}`, - agent: agent + agent: agent, }, common.mustCall((res) => { let data = ''; res.setEncoding('ascii'); diff --git a/test/sequential/test-http-server-keep-alive-timeout-slow-server.js b/test/sequential/test-http-server-keep-alive-timeout-slow-server.js index 1543c1415fa5e9..547aac9ff935ca 100644 --- a/test/sequential/test-http-server-keep-alive-timeout-slow-server.js +++ b/test/sequential/test-http-server-keep-alive-timeout-slow-server.js @@ -18,7 +18,7 @@ server.keepAliveTimeout = common.platformTimeout(200); const agent = new http.Agent({ keepAlive: true, - maxSockets: 1 + maxSockets: 1, }); function request(path, callback) { diff --git a/test/sequential/test-http-server-request-timeouts-mixed.js b/test/sequential/test-http-server-request-timeouts-mixed.js index 17b17e671d8709..034aa3630bbf69 100644 --- a/test/sequential/test-http-server-request-timeouts-mixed.js +++ b/test/sequential/test-http-server-request-timeouts-mixed.js @@ -21,7 +21,7 @@ const server = createServer({ headersTimeout, requestTimeout: headersTimeout * 2, keepAliveTimeout: 0, - connectionsCheckingInterval + connectionsCheckingInterval, }, common.mustCall((req, res) => { req.resume(); @@ -40,7 +40,7 @@ function createClient(server) { index: i++, client: connect(server.address().port), response: '', - completed: false + completed: false, }; request.client.setEncoding('utf8'); diff --git a/test/sequential/test-http2-max-session-memory.js b/test/sequential/test-http2-max-session-memory.js index 229bd7374458f9..51560b31299d41 100644 --- a/test/sequential/test-http2-max-session-memory.js +++ b/test/sequential/test-http2-max-session-memory.js @@ -34,7 +34,7 @@ server.listen(0, common.mustCall(() => { req.on('error', common.expectsError({ code: 'ERR_HTTP2_STREAM_ERROR', name: 'Error', - message: 'Stream closed with error code NGHTTP2_ENHANCE_YOUR_CALM' + message: 'Stream closed with error code NGHTTP2_ENHANCE_YOUR_CALM', })); req.on('close', common.mustCall(() => { server.close(); diff --git a/test/sequential/test-http2-timeout-large-write-file.js b/test/sequential/test-http2-timeout-large-write-file.js index 15c7d9f0ae104a..c0675ced2c1326 100644 --- a/test/sequential/test-http2-timeout-large-write-file.js +++ b/test/sequential/test-http2-timeout-large-write-file.js @@ -36,13 +36,13 @@ process.on('beforeExit', () => fs.closeSync(fd)); const server = http2.createSecureServer({ key: fixtures.readKey('agent1-key.pem'), - cert: fixtures.readKey('agent1-cert.pem') + cert: fixtures.readKey('agent1-cert.pem'), }); server.on('stream', common.mustCall((stream) => { stream.respondWithFD(fd, { 'Content-Type': 'application/octet-stream', 'Content-Length': content.length.toString(), - 'Vary': 'Accept-Encoding' + 'Vary': 'Accept-Encoding', }); stream.end(); })); diff --git a/test/sequential/test-http2-timeout-large-write.js b/test/sequential/test-http2-timeout-large-write.js index 9f21042d88ca5b..ea5fd1973b71be 100644 --- a/test/sequential/test-http2-timeout-large-write.js +++ b/test/sequential/test-http2-timeout-large-write.js @@ -26,7 +26,7 @@ let didReceiveData = false; const server = http2.createSecureServer({ key: fixtures.readKey('agent1-key.pem'), - cert: fixtures.readKey('agent1-cert.pem') + cert: fixtures.readKey('agent1-cert.pem'), }); const onTimeout = common.mustCallAtLeast(() => { assert.ok(!didReceiveData, 'Should not timeout'); @@ -37,7 +37,7 @@ server.on('stream', common.mustCall((stream) => { stream.respond({ 'Content-Type': 'application/octet-stream', 'Content-Length': content.length.toString(), - 'Vary': 'Accept-Encoding' + 'Vary': 'Accept-Encoding', }); stream.write(content); diff --git a/test/sequential/test-https-server-keep-alive-timeout.js b/test/sequential/test-https-server-keep-alive-timeout.js index 5ded520dc7aaf8..d0e29ad28500dc 100644 --- a/test/sequential/test-https-server-keep-alive-timeout.js +++ b/test/sequential/test-https-server-keep-alive-timeout.js @@ -13,7 +13,7 @@ const tests = []; const serverOptions = { key: fixtures.readKey('agent1-key.pem'), - cert: fixtures.readKey('agent1-cert.pem') + cert: fixtures.readKey('agent1-cert.pem'), }; function test(fn) { @@ -45,7 +45,7 @@ test(function serverKeepAliveTimeoutWithPipeline(cb) { const options = { port: server.address().port, allowHalfOpen: true, - rejectUnauthorized: false + rejectUnauthorized: false, }; const c = tls.connect(options, () => { c.write('GET /1 HTTP/1.1\r\nHost: localhost\r\n\r\n'); @@ -68,7 +68,7 @@ test(function serverNoEndKeepAliveTimeoutWithPipeline(cb) { const options = { port: server.address().port, allowHalfOpen: true, - rejectUnauthorized: false + rejectUnauthorized: false, }; const c = tls.connect(options, () => { c.write('GET /1 HTTP/1.1\r\nHost: localhost\r\n\r\n'); diff --git a/test/sequential/test-inspector-port-cluster.js b/test/sequential/test-inspector-port-cluster.js index 510249b739dfb7..de5484e8c5e784 100644 --- a/test/sequential/test-inspector-port-cluster.js +++ b/test/sequential/test-inspector-port-cluster.js @@ -20,7 +20,7 @@ let offset = 0; function testRunnerMain() { let defaultPortCase = spawnPrimary({ execArgv: ['--inspect'], - workers: [{ expectedPort: 9230 }] + workers: [{ expectedPort: 9230 }], }); spawnPrimary({ @@ -30,7 +30,7 @@ function testRunnerMain() { { expectedPort: 1024 }, { expectedPort: 1025 }, { expectedPort: 1026 }, - ] + ], }); let port = debuggerPort + offset++ * 5; @@ -41,35 +41,35 @@ function testRunnerMain() { { expectedPort: port + 1 }, { expectedPort: port + 2 }, { expectedPort: port + 3 }, - ] + ], }); port = debuggerPort + offset++ * 5; spawnPrimary({ execArgv: ['--inspect', `--inspect-port=${port}`], - workers: [{ expectedPort: port + 1 }] + workers: [{ expectedPort: port + 1 }], }); port = debuggerPort + offset++ * 5; spawnPrimary({ execArgv: ['--inspect', `--debug-port=${port}`], - workers: [{ expectedPort: port + 1 }] + workers: [{ expectedPort: port + 1 }], }); port = debuggerPort + offset++ * 5; spawnPrimary({ execArgv: [`--inspect=0.0.0.0:${port}`], - workers: [{ expectedPort: port + 1, expectedHost: '0.0.0.0' }] + workers: [{ expectedPort: port + 1, expectedHost: '0.0.0.0' }], }); port = debuggerPort + offset++ * 5; spawnPrimary({ execArgv: [`--inspect=127.0.0.1:${port}`], - workers: [{ expectedPort: port + 1, expectedHost: '127.0.0.1' }] + workers: [{ expectedPort: port + 1, expectedHost: '127.0.0.1' }], }); if (common.hasIPv6) { @@ -77,14 +77,14 @@ function testRunnerMain() { spawnPrimary({ execArgv: [`--inspect=[::]:${port}`], - workers: [{ expectedPort: port + 1, expectedHost: '::' }] + workers: [{ expectedPort: port + 1, expectedHost: '::' }], }); port = debuggerPort + offset++ * 5; spawnPrimary({ execArgv: [`--inspect=[::1]:${port}`], - workers: [{ expectedPort: port + 1, expectedHost: '::1' }] + workers: [{ expectedPort: port + 1, expectedHost: '::1' }], }); } @@ -96,7 +96,7 @@ function testRunnerMain() { spawnPrimary({ execArgv: [`--inspect=${port}`], clusterSettings: { inspectPort: port + 2 }, - workers: [{ expectedPort: port + 2 }] + workers: [{ expectedPort: port + 2 }], }); port = debuggerPort + offset++ * 5; @@ -107,7 +107,7 @@ function testRunnerMain() { workers: [ { expectedPort: port + 2 }, { expectedPort: port + 4 }, - ] + ], }); port = debuggerPort + offset++ * 5; @@ -115,7 +115,7 @@ function testRunnerMain() { spawnPrimary({ execArgv: [`--inspect=${port}`], clusterSettings: { inspectPort: 'string' }, - workers: [{}] + workers: [{}], }); port = debuggerPort + offset++ * 5; @@ -123,7 +123,7 @@ function testRunnerMain() { spawnPrimary({ execArgv: [`--inspect=${port}`], clusterSettings: { inspectPort: 'null' }, - workers: [{}] + workers: [{}], }); port = debuggerPort + offset++ * 5; @@ -131,7 +131,7 @@ function testRunnerMain() { spawnPrimary({ execArgv: [`--inspect=${port}`], clusterSettings: { inspectPort: 'bignumber' }, - workers: [{}] + workers: [{}], }); port = debuggerPort + offset++ * 5; @@ -139,7 +139,7 @@ function testRunnerMain() { spawnPrimary({ execArgv: [`--inspect=${port}`], clusterSettings: { inspectPort: 'negativenumber' }, - workers: [{}] + workers: [{}], }); port = debuggerPort + offset++ * 5; @@ -147,7 +147,7 @@ function testRunnerMain() { spawnPrimary({ execArgv: [`--inspect=${port}`], clusterSettings: { inspectPort: 'bignumberfunc' }, - workers: [{}] + workers: [{}], }); port = debuggerPort + offset++ * 5; @@ -155,7 +155,7 @@ function testRunnerMain() { spawnPrimary({ execArgv: [`--inspect=${port}`], clusterSettings: { inspectPort: 'strfunc' }, - workers: [{}] + workers: [{}], }); port = debuggerPort + offset++ * 5; @@ -165,7 +165,7 @@ function testRunnerMain() { clusterSettings: { inspectPort: port, execArgv: ['--inspect'] }, workers: [ { expectedPort: port }, - ] + ], }); port = debuggerPort + offset++ * 5; @@ -177,7 +177,7 @@ function testRunnerMain() { { expectedInitialPort: 0 }, { expectedInitialPort: 0 }, { expectedInitialPort: 0 }, - ] + ], }); port = debuggerPort + offset++ * 5; @@ -189,7 +189,7 @@ function testRunnerMain() { { expectedInitialPort: 0 }, { expectedInitialPort: 0 }, { expectedInitialPort: 0 }, - ] + ], }); defaultPortCase.then(() => { @@ -199,7 +199,7 @@ function testRunnerMain() { clusterSettings: { inspectPort: port + 2 }, workers: [ { expectedInitialPort: port + 2 }, - ] + ], }); }); } @@ -331,7 +331,7 @@ function spawnPrimary({ execArgv, workers, clusterSettings = {} }) { workers: JSON.stringify(workers), clusterSettings: JSON.stringify(clusterSettings), testProcess: true }, - execArgv: execArgv.concat(['--expose-internals']) + execArgv: execArgv.concat(['--expose-internals']), }).on('exit', common.mustCall((code, signal) => { checkExitCode(code, signal); resolve(); diff --git a/test/sequential/test-module-loading.js b/test/sequential/test-module-loading.js index b4f2d2633074f2..1e2efc6fd26a6b 100644 --- a/test/sequential/test-module-loading.js +++ b/test/sequential/test-module-loading.js @@ -122,7 +122,7 @@ assert.throws( code: 'MODULE_NOT_FOUND', message: /packages[/\\]missing-main-no-index[/\\]doesnotexist\.js'\. Please.+package\.json.+valid "main"/, path: /fixtures[/\\]packages[/\\]missing-main-no-index[/\\]package\.json/, - requestPath: /^\.\.[/\\]fixtures[/\\]packages[/\\]missing-main-no-index$/ + requestPath: /^\.\.[/\\]fixtures[/\\]packages[/\\]missing-main-no-index$/, } ); @@ -181,7 +181,7 @@ assert.strictEqual(require('../fixtures/registerExt.hello.world').test, console.error('load custom file types that return non-strings'); require.extensions['.test'] = function(module) { module.exports = { - custom: 'passed' + custom: 'passed', }; }; @@ -256,7 +256,7 @@ assert.throws( assert.deepStrictEqual(json, { name: 'package-name', version: '1.2.3', - main: 'package-main-module' + main: 'package-main-module', }); } @@ -278,21 +278,21 @@ assert.throws( assert.deepStrictEqual(children, { 'common/index.js': { - 'common/tmpdir.js': {} + 'common/tmpdir.js': {}, }, 'fixtures/not-main-module.js': {}, 'fixtures/a.js': { 'fixtures/b/c.js': { 'fixtures/b/d.js': {}, - 'fixtures/b/package/index.js': {} - } + 'fixtures/b/package/index.js': {}, + }, }, 'fixtures/foo': {}, 'fixtures/nested-index/one/index.js': { - 'fixtures/nested-index/one/hello.js': {} + 'fixtures/nested-index/one/hello.js': {}, }, 'fixtures/nested-index/two/index.js': { - 'fixtures/nested-index/two/hello.js': {} + 'fixtures/nested-index/two/hello.js': {}, }, 'fixtures/nested-index/three.js': {}, 'fixtures/nested-index/three/index.js': {}, @@ -301,13 +301,13 @@ assert.throws( 'fixtures/packages/main-index/package-main-module/index.js': {}, 'fixtures/packages/missing-main/index.js': {}, 'fixtures/cycles/root.js': { - 'fixtures/cycles/folder/foo.js': {} + 'fixtures/cycles/folder/foo.js': {}, }, 'fixtures/node_modules/foo.js': { 'fixtures/node_modules/baz/index.js': { 'fixtures/node_modules/bar.js': {}, - 'fixtures/node_modules/baz/node_modules/asdf.js': {} - } + 'fixtures/node_modules/baz/node_modules/asdf.js': {}, + }, }, 'fixtures/path.js': {}, 'fixtures/registerExt.test': {}, @@ -322,10 +322,10 @@ assert.throws( 'fixtures/module-load-order/file9/index.reg2': {}, 'fixtures/module-require/parent/index.js': { 'fixtures/module-require/child/index.js': { - 'fixtures/module-require/child/node_modules/target.js': {} - } + 'fixtures/module-require/child/node_modules/target.js': {}, + }, }, - 'fixtures/packages/main/package.json': {} + 'fixtures/packages/main/package.json': {}, }); } diff --git a/test/sequential/test-net-GH-5504.js b/test/sequential/test-net-GH-5504.js index ebe987d0443b6c..3bdd76b6260f8e 100644 --- a/test/sequential/test-net-GH-5504.js +++ b/test/sequential/test-net-GH-5504.js @@ -61,7 +61,7 @@ function client() { const net = require('net'); const client = net.connect({ host: common.localhostIPv4, - port: common.PORT + port: common.PORT, }, function() { client.destroy(); }); @@ -73,8 +73,8 @@ function parent() { const s = spawn(node, [__filename, 'server'], { env: Object.assign(process.env, { - NODE_DEBUG: 'net' - }) + NODE_DEBUG: 'net', + }), }); wrap(s.stderr, process.stderr, 'SERVER 2>'); diff --git a/test/sequential/test-net-connect-local-error.js b/test/sequential/test-net-connect-local-error.js index 6169c14989bd87..c18903001dd6e6 100644 --- a/test/sequential/test-net-connect-local-error.js +++ b/test/sequential/test-net-connect-local-error.js @@ -11,7 +11,7 @@ const optionsIPv4 = { port: common.PORT, family: 4, localPort: common.PORT + 1, - localAddress: common.localhostIPv4 + localAddress: common.localhostIPv4, }; const optionsIPv6 = { diff --git a/test/sequential/test-net-listen-shared-ports.js b/test/sequential/test-net-listen-shared-ports.js index e902d5387d6915..34091cba15cac6 100644 --- a/test/sequential/test-net-listen-shared-ports.js +++ b/test/sequential/test-net-listen-shared-ports.js @@ -55,7 +55,7 @@ if (cluster.isPrimary) { server1.listen({ host: 'localhost', port: common.PORT, - exclusive: false + exclusive: false, }, common.mustCall(function() { server2.listen({ port: common.PORT + 1, exclusive: true }, common.mustCall(function() { diff --git a/test/sequential/test-next-tick-error-spin.js b/test/sequential/test-next-tick-error-spin.js index 071a017877217a..d3ee6dbd01c6d8 100644 --- a/test/sequential/test-next-tick-error-spin.js +++ b/test/sequential/test-next-tick-error-spin.js @@ -26,7 +26,7 @@ const assert = require('assert'); if (process.argv[2] !== 'child') { const spawn = require('child_process').spawn; const child = spawn(process.execPath, [__filename, 'child'], { - stdio: 'pipe'// 'inherit' + stdio: 'pipe', // 'inherit' }); const timer = setTimeout(function() { throw new Error('child is hung'); diff --git a/test/sequential/test-performance-eventloopdelay.js b/test/sequential/test-performance-eventloopdelay.js index 0d38300d7b3a15..c6d8dba51c0bcc 100644 --- a/test/sequential/test-performance-eventloopdelay.js +++ b/test/sequential/test-performance-eventloopdelay.js @@ -5,7 +5,7 @@ const common = require('../common'); const assert = require('assert'); const os = require('os'); const { - monitorEventLoopDelay + monitorEventLoopDelay, } = require('perf_hooks'); const { sleep } = require('internal/util'); @@ -25,7 +25,7 @@ const { sleep } = require('internal/util'); () => monitorEventLoopDelay(i), { name: 'TypeError', - code: 'ERR_INVALID_ARG_TYPE' + code: 'ERR_INVALID_ARG_TYPE', } ); }); @@ -35,7 +35,7 @@ const { sleep } = require('internal/util'); () => monitorEventLoopDelay({ resolution: i }), { name: 'TypeError', - code: 'ERR_INVALID_ARG_TYPE' + code: 'ERR_INVALID_ARG_TYPE', } ); }); @@ -45,7 +45,7 @@ const { sleep } = require('internal/util'); () => monitorEventLoopDelay({ resolution: i }), { name: 'RangeError', - code: 'ERR_OUT_OF_RANGE' + code: 'ERR_OUT_OF_RANGE', } ); }); @@ -87,7 +87,7 @@ const { sleep } = require('internal/util'); () => histogram.percentile(i), { name: 'TypeError', - code: 'ERR_INVALID_ARG_TYPE' + code: 'ERR_INVALID_ARG_TYPE', } ); }); @@ -96,7 +96,7 @@ const { sleep } = require('internal/util'); () => histogram.percentile(i), { name: 'RangeError', - code: 'ERR_OUT_OF_RANGE' + code: 'ERR_OUT_OF_RANGE', } ); }); diff --git a/test/sequential/test-pipe.js b/test/sequential/test-pipe.js index 4defd4628e37c9..7515e4c705b08f 100644 --- a/test/sequential/test-pipe.js +++ b/test/sequential/test-pipe.js @@ -93,7 +93,7 @@ function startClient() { port: common.PORT, method: 'GET', path: '/', - headers: { 'content-length': buffer.length } + headers: { 'content-length': buffer.length }, }, common.mustCall((res) => { res.setEncoding('utf8'); res.on('data', common.mustCall((string) => { diff --git a/test/sequential/test-repl-timeout-throw.js b/test/sequential/test-repl-timeout-throw.js index d8f1df9564e49f..fcebf762647fbf 100644 --- a/test/sequential/test-repl-timeout-throw.js +++ b/test/sequential/test-repl-timeout-throw.js @@ -5,7 +5,7 @@ const assert = require('assert'); const spawn = require('child_process').spawn; const child = spawn(process.execPath, [ '-i' ], { - stdio: [null, null, 2] + stdio: [null, null, 2], }); let stdout = ''; diff --git a/test/sequential/test-runner-run-inspect.mjs b/test/sequential/test-runner-run-inspect.mjs index 35c380c8d4e33e..959c20f880aa32 100644 --- a/test/sequential/test-runner-run-inspect.mjs +++ b/test/sequential/test-runner-run-inspect.mjs @@ -15,7 +15,7 @@ async function spawnRunner({ execArgv, expectedPort, expectedHost, expectedIniti expectedPort, inspectPort, expectedHost, - expectedInitialPort } + expectedInitialPort }, }); assert.strictEqual(code, 0); assert.strictEqual(signal, null); @@ -65,7 +65,7 @@ port = debuggerPort + offset++ * 5; await spawnRunner({ execArgv: [`--inspect=127.0.0.1:${port}`], - expectedPort: port + 1, expectedHost: '127.0.0.1' + expectedPort: port + 1, expectedHost: '127.0.0.1', }); if (common.hasIPv6) { @@ -73,14 +73,14 @@ if (common.hasIPv6) { await spawnRunner({ execArgv: [`--inspect=[::]:${port}`], - expectedPort: port + 1, expectedHost: '::' + expectedPort: port + 1, expectedHost: '::', }); port = debuggerPort + offset++ * 5; await spawnRunner({ execArgv: [`--inspect=[::1]:${port}`], - expectedPort: port + 1, expectedHost: '::1' + expectedPort: port + 1, expectedHost: '::1', }); } @@ -136,7 +136,7 @@ port = debuggerPort + offset++ * 5; await spawnRunner({ execArgv: [`--inspect=${port}`], - inspectPort: 'bignumberfunc' + inspectPort: 'bignumberfunc', }); port = debuggerPort + offset++ * 5; diff --git a/test/sequential/test-tls-connect.js b/test/sequential/test-tls-connect.js index 5cfec7ed04707d..189b9afa6352bb 100644 --- a/test/sequential/test-tls-connect.js +++ b/test/sequential/test-tls-connect.js @@ -55,7 +55,7 @@ const tls = require('tls'); cert: cert, key: key, port: common.PORT, - ciphers: 'rick-128-roll' + ciphers: 'rick-128-roll', }, common.mustNotCall()); }, /no cipher match/i); } diff --git a/test/sequential/test-tls-lookup.js b/test/sequential/test-tls-lookup.js index dba39c17ab7b31..4b123a97629936 100644 --- a/test/sequential/test-tls-lookup.js +++ b/test/sequential/test-tls-lookup.js @@ -10,14 +10,14 @@ const tls = require('tls'); const opts = { host: 'localhost', port: common.PORT, - lookup: input + lookup: input, }; assert.throws(() => { tls.connect(opts); }, { code: 'ERR_INVALID_ARG_TYPE', - name: 'TypeError' + name: 'TypeError', }); }); @@ -27,7 +27,7 @@ function connectDoesNotThrow(input) { const opts = { host: 'localhost', port: common.PORT, - lookup: input + lookup: input, }; tls.connect(opts); diff --git a/test/sequential/test-tls-psk-client.js b/test/sequential/test-tls-psk-client.js index c9a904e729b830..65e628a6f4e0eb 100644 --- a/test/sequential/test-tls-psk-client.js +++ b/test/sequential/test-tls-psk-client.js @@ -94,10 +94,10 @@ function runClient(message, cb) { if (hint === null || hint === IDENTITY) { return { identity: IDENTITY, - psk: Buffer.from(KEY, 'hex') + psk: Buffer.from(KEY, 'hex'), }; } - } + }, }); s.on('secureConnect', common.mustCall(() => { let data = ''; diff --git a/test/sequential/test-tls-session-timeout.js b/test/sequential/test-tls-session-timeout.js index 44e8d537fc0bfc..79298fc1abbee2 100644 --- a/test/sequential/test-tls-session-timeout.js +++ b/test/sequential/test-tls-session-timeout.js @@ -83,7 +83,7 @@ function doTest() { flags.push('-sess_out', sessOut); } const client = spawn(opensslCli, flags, { - stdio: ['ignore', 'pipe', 'inherit'] + stdio: ['ignore', 'pipe', 'inherit'], }); let clientOutput = ''; diff --git a/test/sequential/test-util-debug.js b/test/sequential/test-util-debug.js index be7feda51e267b..f6c4fbd1273691 100644 --- a/test/sequential/test-util-debug.js +++ b/test/sequential/test-util-debug.js @@ -63,8 +63,8 @@ function test(environ, shouldWrite, section, forceColors = false) { const child = spawn(process.execPath, [__filename, 'child', section], { env: Object.assign(process.env, { NODE_DEBUG: environ, - FORCE_COLOR: forceColors ? 'true' : 'false' - }) + FORCE_COLOR: forceColors ? 'true' : 'false', + }), }); if (shouldWrite) { @@ -114,7 +114,7 @@ function child(section) { const tty = require('tty'); // Make sure we check for colors, no matter of the stream's default. Object.defineProperty(process.stderr, 'hasColors', { - value: tty.WriteStream.prototype.hasColors + value: tty.WriteStream.prototype.hasColors, }); let innerDebug = null; diff --git a/test/sequential/test-vm-timeout-escape-promise-module-2.js b/test/sequential/test-vm-timeout-escape-promise-module-2.js index 13aa2fe998655d..503395bec7f94a 100644 --- a/test/sequential/test-vm-timeout-escape-promise-module-2.js +++ b/test/sequential/test-vm-timeout-escape-promise-module-2.js @@ -31,12 +31,12 @@ assert.rejects(async () => { { context: vm.createContext({ hrtime, - loop - }, { microtaskMode: 'afterEvaluate' }) + loop, + }, { microtaskMode: 'afterEvaluate' }), }); await module.link(common.mustNotCall()); await module.evaluate({ timeout: 10 }); }, { code: 'ERR_SCRIPT_EXECUTION_TIMEOUT', - message: 'Script execution timed out after 10ms' + message: 'Script execution timed out after 10ms', }).then(common.mustCall()); diff --git a/test/sequential/test-watch-mode-inspect.mjs b/test/sequential/test-watch-mode-inspect.mjs index a04ba474f6a47f..f2886f11b56da4 100644 --- a/test/sequential/test-watch-mode-inspect.mjs +++ b/test/sequential/test-watch-mode-inspect.mjs @@ -22,7 +22,7 @@ async function getDebuggedPid(instance, waitForLog = true) { await session.waitForConsoleOutput('log', 'safe to debug now'); } const { value: innerPid } = (await session.send({ - 'method': 'Runtime.evaluate', 'params': { 'expression': 'process.pid' } + 'method': 'Runtime.evaluate', 'params': { 'expression': 'process.pid' }, })).result; session.disconnect(); gettingDebuggedPid = false; diff --git a/test/sequential/test-watch-mode-watch-flags.mjs b/test/sequential/test-watch-mode-watch-flags.mjs index 8cd08ee08a4c0e..385f381ad6a0ed 100644 --- a/test/sequential/test-watch-mode-watch-flags.mjs +++ b/test/sequential/test-watch-mode-watch-flags.mjs @@ -63,7 +63,7 @@ describe('watch mode - watch flags', { concurrency: !process.env.TEST_PARALLEL, );`, '.js', projectDir); const args = ['--watch', '--watch', file]; const { stdout, stderr } = await runNode({ - file, args, options: { cwd: projectDir } + file, args, options: { cwd: projectDir }, }); assert.strictEqual(stderr, ''); @@ -85,7 +85,7 @@ describe('watch mode - watch flags', { concurrency: !process.env.TEST_PARALLEL, );`, '.js', projectDir); const args = ['--watch', `--watch-path`, file, file]; const { stdout, stderr } = await runNode({ - file, args, options: { cwd: projectDir } + file, args, options: { cwd: projectDir }, }); assert.strictEqual(stderr, ''); diff --git a/test/sequential/test-watch-mode.mjs b/test/sequential/test-watch-mode.mjs index dc7ccf6cf6d2e7..b9e57cb30bedc9 100644 --- a/test/sequential/test-watch-mode.mjs +++ b/test/sequential/test-watch-mode.mjs @@ -86,7 +86,7 @@ function runInBackground({ args = [], options = {}, completed = 'Completed runni return future.promise.finally(() => { clearTimeout(timer); }); - } + }, }; } @@ -98,7 +98,7 @@ async function runWriteSucceed({ completed = 'Completed running', restarts = 2, options = {}, - shouldFail = false + shouldFail = false, }) { args.unshift('--no-warnings'); if (watchFlag !== null) args.unshift(watchFlag); @@ -165,7 +165,7 @@ describe('watch mode', { concurrency: !process.env.TEST_PARALLEL, timeout: 60_00 it('should watch changes to a file', async () => { const file = createTmpFile(); const { stderr, stdout } = await runWriteSucceed({ file, watchedFile: file, watchFlag: '--watch=true', options: { - timeout: 10000 + timeout: 10000, } }); assert.strictEqual(stderr, ''); @@ -274,7 +274,7 @@ describe('watch mode', { concurrency: !process.env.TEST_PARALLEL, timeout: 60_00 file, watchedFile: file, completed: 'Failed running', - shouldFail: true + shouldFail: true, }); assert.match(stderr, /Error: fails\r?\n/); @@ -307,7 +307,7 @@ describe('watch mode', { concurrency: !process.env.TEST_PARALLEL, timeout: 60_00 }); it('should watch when running an non-existing file - when specified under --watch-path', { - skip: !supportsRecursive + skip: !supportsRecursive, }, async () => { const dir = tmpdir.resolve('subdir2'); mkdirSync(dir); @@ -319,7 +319,7 @@ describe('watch mode', { concurrency: !process.env.TEST_PARALLEL, timeout: 60_00 watchedFile, args, completed: 'Failed running', - shouldFail: true + shouldFail: true, }); assert.match(stderr, /Error: Cannot find module/g); @@ -331,7 +331,7 @@ describe('watch mode', { concurrency: !process.env.TEST_PARALLEL, timeout: 60_00 }); it('should watch when running an non-existing file - when specified under --watch-path with equals', { - skip: !supportsRecursive + skip: !supportsRecursive, }, async () => { const dir = tmpdir.resolve('subdir3'); mkdirSync(dir); @@ -343,7 +343,7 @@ describe('watch mode', { concurrency: !process.env.TEST_PARALLEL, timeout: 60_00 watchedFile, args, completed: 'Failed running', - shouldFail: true + shouldFail: true, }); assert.match(stderr, /Error: Cannot find module/g); @@ -481,21 +481,21 @@ console.log(values.random); // TODO: Remove skip after https://github.com/nodejs/node/pull/45271 lands it('should not watch when running an missing file', { - skip: !supportsRecursive + skip: !supportsRecursive, }, async () => { const nonExistingfile = tmpdir.resolve(`${tmpFiles++}.js`); await failWriteSucceed({ file: nonExistingfile, watchedFile: nonExistingfile }); }); it('should not watch when running an missing mjs file', { - skip: !supportsRecursive + skip: !supportsRecursive, }, async () => { const nonExistingfile = tmpdir.resolve(`${tmpFiles++}.mjs`); await failWriteSucceed({ file: nonExistingfile, watchedFile: nonExistingfile }); }); it('should watch changes to previously missing dependency', { - skip: !supportsRecursive + skip: !supportsRecursive, }, async () => { const dependency = tmpdir.resolve(`${tmpFiles++}.js`); const relativeDependencyPath = `./${path.basename(dependency)}`; @@ -505,7 +505,7 @@ console.log(values.random); }); it('should watch changes to previously missing ESM dependency', { - skip: !supportsRecursive + skip: !supportsRecursive, }, async () => { const relativeDependencyPath = `./${tmpFiles++}.mjs`; const dependency = tmpdir.resolve(relativeDependencyPath); @@ -559,8 +559,8 @@ console.log(values.random); const args = [`--watch-path=${dir}`, '--require', './some.js', file]; const { stdout, stderr } = await runWriteSucceed({ file, watchedFile, args, options: { - cwd: projectDir - } + cwd: projectDir, + }, }); assert.strictEqual(stderr, ''); @@ -591,8 +591,8 @@ console.log(values.random); const args = [`--watch-path=${dir}`, '--require=./some.js', file]; const { stdout, stderr } = await runWriteSucceed({ file, watchedFile, args, options: { - cwd: projectDir - } + cwd: projectDir, + }, }); assert.strictEqual(stderr, ''); @@ -623,8 +623,8 @@ console.log(values.random); const args = ['--watch-path', `${dir}`, '--require', './some.js', file]; const { stdout, stderr } = await runWriteSucceed({ file, watchedFile, args, options: { - cwd: projectDir - } + cwd: projectDir, + }, }); assert.strictEqual(stderr, ''); @@ -655,8 +655,8 @@ console.log(values.random); const args = ['--watch-path', `${dir}`, '--require=./some.js', file]; const { stdout, stderr } = await runWriteSucceed({ file, watchedFile, args, options: { - cwd: projectDir - } + cwd: projectDir, + }, }); assert.strictEqual(stderr, ''); @@ -697,7 +697,7 @@ console.log(values.random); const file = createTmpFile("console.log('running');", '.js', projectDir); const args = ['--watch', '-r', './some.js', file]; const { stdout, stderr } = await runWriteSucceed({ - file, watchedFile: file, watchFlag: null, args, options: { cwd: projectDir } + file, watchedFile: file, watchFlag: null, args, options: { cwd: projectDir }, }); assert.strictEqual(stderr, ''); @@ -797,8 +797,8 @@ process.on('message', (message) => { const configFile = createTmpFile(JSON.stringify({ watch: { 'watch': true } }), '.json'); const { stderr, stdout } = await runWriteSucceed({ file, watchedFile: file, args: ['--experimental-config-file', configFile, file], options: { - timeout: 10000 - } + timeout: 10000, + }, }); assert.strictEqual(stderr, ''); @@ -847,8 +847,8 @@ process.on('message', (message) => { args: ['--experimental-default-config-file', file], options: { timeout: 10000, - cwd: dir - } + cwd: dir, + }, }); assert.strictEqual(stderr, ''); @@ -868,7 +868,7 @@ process.on('message', (message) => { const envFileA = createTmpFile(`${envKey}=123`, '.env'); const envFileB = createTmpFile(`${envKey2}=456`, '.env'); const { done, restart } = runInBackground({ - args: ['--watch', `--env-file=${envFileA}`, `--env-file=${envFileB}`, jsFile] + args: ['--watch', `--env-file=${envFileA}`, `--env-file=${envFileB}`, jsFile], }); try { diff --git a/test/sequential/test-worker-fshandles-error-on-termination.js b/test/sequential/test-worker-fshandles-error-on-termination.js index ada99a991bcc97..e7438c0cc7b263 100644 --- a/test/sequential/test-worker-fshandles-error-on-termination.js +++ b/test/sequential/test-worker-fshandles-error-on-termination.js @@ -35,7 +35,7 @@ if (!process.env.HAS_STARTED_WORKER) { fs.open('this file does not exist'), { code: 'ENOENT', - syscall: 'open' + syscall: 'open', } ); await scheduler.yield(); diff --git a/test/sequential/test-worker-prof.js b/test/sequential/test-worker-prof.js index c04b4646a045db..a3cf4f26ff252e 100644 --- a/test/sequential/test-worker-prof.js +++ b/test/sequential/test-worker-prof.js @@ -64,7 +64,7 @@ if (process.argv[2] === 'child') { assert.match(output, workerProfRegexp); assert.match(output, parentProfRegexp); return true; - } + }, }); const workerProf = stdout.match(workerProfRegexp)[1]; const parentProf = stdout.match(parentProfRegexp)[1]; diff --git a/test/sequential/test-write-heapsnapshot-options.js b/test/sequential/test-write-heapsnapshot-options.js index cc3b4b19f4d724..dca3cfebfc8df5 100644 --- a/test/sequential/test-write-heapsnapshot-options.js +++ b/test/sequential/test-write-heapsnapshot-options.js @@ -40,7 +40,7 @@ for (let i = 0; i < tests.cases.length; ++i) { process.execPath, ['--expose-internals', __filename, 'child', i + ''], { - cwd: tmpdir.path + cwd: tmpdir.path, }); const stderr = child.stderr.toString(); const stdout = child.stdout.toString();