diff --git a/test/abort/test-worker-abort-uncaught-exception.js b/test/abort/test-worker-abort-uncaught-exception.js
index 63f7acdddc7fd7..141e2cacdbe69b 100644
--- a/test/abort/test-worker-abort-uncaught-exception.js
+++ b/test/abort/test-worker-abort-uncaught-exception.js
@@ -12,7 +12,7 @@ if (process.argv[2] === 'child') {
}
const child = spawn(process.execPath, [
- '--abort-on-uncaught-exception', __filename, 'child'
+ '--abort-on-uncaught-exception', __filename, 'child',
]);
child.on('exit', common.mustCall((code, sig) => {
if (common.isWindows) {
diff --git a/test/addons/register-signal-handler/test.js b/test/addons/register-signal-handler/test.js
index f56bb2f411024c..145baf2da610e6 100644
--- a/test/addons/register-signal-handler/test.js
+++ b/test/addons/register-signal-handler/test.js
@@ -34,7 +34,7 @@ for (const raiseSignal of [ 'SIGABRT', 'SIGSEGV' ]) {
{ reset: true, count: 1, stderr: [signo], code: 0, signal: null },
{ reset: true, count: 2, stderr: [signo], code: null, signal: raiseSignal },
{ reset: false, count: 1, stderr: [signo], code: 0, signal: null },
- { reset: false, count: 2, stderr: [signo, signo], code: 0, signal: null }
+ { reset: false, count: 2, stderr: [signo, signo], code: 0, signal: null },
]) {
// We do not want to generate core files when running this test as an
// addon test. We require this file as an abort test as well, though,
diff --git a/test/addons/worker-addon/test.js b/test/addons/worker-addon/test.js
index f2df4665f53068..f9923638d48767 100644
--- a/test/addons/worker-addon/test.js
+++ b/test/addons/worker-addon/test.js
@@ -48,7 +48,7 @@ for (const { test, expected } of [
// musl doesn't support unloading, so the output may be missing
// a dtor + ctor pair.
expected: [
- 'ctor cleanup dtor ctor cleanup dtor '
+ 'ctor cleanup dtor ctor cleanup dtor ',
].concat(libcMayBeMusl ? [
'ctor cleanup cleanup dtor ',
] : [])
@@ -57,7 +57,7 @@ for (const { test, expected } of [
console.log('spawning test', test);
const proc = child_process.spawnSync(process.execPath, [
__filename,
- test
+ test,
]);
process.stderr.write(proc.stderr.toString());
assert.strictEqual(proc.stderr.toString(), '');
diff --git a/test/async-hooks/test-graph.tls-write.js b/test/async-hooks/test-graph.tls-write.js
index 078dd27c36088c..b493ac819dfbcd 100644
--- a/test/async-hooks/test-graph.tls-write.js
+++ b/test/async-hooks/test-graph.tls-write.js
@@ -65,7 +65,7 @@ function onexit() {
{ type: 'TCPCONNECTWRAP',
id: 'tcpconnect:1', triggerAsyncId: 'tcp:1' },
{ type: 'TCPWRAP', id: 'tcp:2', triggerAsyncId: 'tcpserver:1' },
- { type: 'TLSWRAP', id: 'tls:2', triggerAsyncId: 'tcpserver:1' }
+ { type: 'TLSWRAP', id: 'tls:2', triggerAsyncId: 'tcpserver:1' },
]
);
}
diff --git a/test/common/README.md b/test/common/README.md
index f05308d0da3bb6..31bf0b972a8516 100644
--- a/test/common/README.md
+++ b/test/common/README.md
@@ -115,12 +115,12 @@ expectWarning('Warning', 'Foobar is really bad');
expectWarning('DeprecationWarning', 'Foobar is deprecated', 'DEP0XXX');
expectWarning('DeprecationWarning', [
- 'Foobar is deprecated', 'DEP0XXX'
+ 'Foobar is deprecated', 'DEP0XXX',
]);
expectWarning('DeprecationWarning', [
['Foobar is deprecated', 'DEP0XXX'],
- ['Baz is also deprecated', 'DEP0XX2']
+ ['Baz is also deprecated', 'DEP0XX2'],
]);
expectWarning('DeprecationWarning', {
@@ -135,7 +135,7 @@ expectWarning({
},
Warning: [
['Multiple array entries are fine', 'SpecialWarningCode'],
- ['No code is also fine']
+ ['No code is also fine'],
],
SingleEntry: ['This will also work', 'WarningCode'],
SingleString: 'Single string entries without code will also work'
@@ -665,9 +665,9 @@ validateSnapshotNodes('TLSWRAP', [
children: [
{ name: 'enc_out' },
{ name: 'enc_in' },
- { name: 'TLSWrap' }
+ { name: 'TLSWrap' },
]
- }
+ },
]);
```
diff --git a/test/common/dns.js b/test/common/dns.js
index 5d05cdc4b51027..3574229db44117 100644
--- a/test/common/dns.js
+++ b/test/common/dns.js
@@ -60,7 +60,7 @@ function parseDNSPacket(buffer) {
['questions', buffer.readUInt16BE(4)],
['answers', buffer.readUInt16BE(6)],
['authorityAnswers', buffer.readUInt16BE(8)],
- ['additionalRecords', buffer.readUInt16BE(10)]
+ ['additionalRecords', buffer.readUInt16BE(10)],
];
let offset = 12;
@@ -185,7 +185,7 @@ function writeDomainName(domain) {
assert(label.length < 64);
return Buffer.concat([
Buffer.from([label.length]),
- Buffer.from(label, 'ascii')
+ Buffer.from(label, 'ascii'),
]);
}).concat([Buffer.alloc(1)]));
}
@@ -208,7 +208,7 @@ function writeDNSPacket(parsed) {
buffers.push(writeDomainName(q.domain));
buffers.push(new Uint16Array([
types[q.type],
- q.cls === undefined ? classes.IN : q.cls
+ q.cls === undefined ? classes.IN : q.cls,
]));
}
@@ -221,7 +221,7 @@ function writeDNSPacket(parsed) {
buffers.push(writeDomainName(rr.domain));
buffers.push(new Uint16Array([
types[rr.type],
- rr.cls === undefined ? classes.IN : rr.cls
+ rr.cls === undefined ? classes.IN : rr.cls,
]));
buffers.push(new Int32Array([rr.ttl]));
@@ -266,7 +266,7 @@ function writeDNSPacket(parsed) {
rdLengthBuf[0] = mname.length + rname.length + 20;
buffers.push(mname, rname);
buffers.push(new Uint32Array([
- rr.serial, rr.refresh, rr.retry, rr.expire, rr.minttl
+ rr.serial, rr.refresh, rr.retry, rr.expire, rr.minttl,
]));
break;
}
diff --git a/test/common/index.js b/test/common/index.js
index 35513e7754e806..13175195c4405c 100644
--- a/test/common/index.js
+++ b/test/common/index.js
@@ -612,7 +612,7 @@ function getArrayBufferViews(buf) {
Uint32Array,
Float32Array,
Float64Array,
- DataView
+ DataView,
];
for (const type of arrayBufferViews) {
diff --git a/test/common/inspector-helper.js b/test/common/inspector-helper.js
index 666624490e79a9..3ab4975ce09c30 100644
--- a/test/common/inspector-helper.js
+++ b/test/common/inspector-helper.js
@@ -515,7 +515,7 @@ function fires(promise, error, timeoutMs) {
const timeout = timeoutPromise(error, timeoutMs);
return Promise.race([
onResolvedOrRejected(promise, () => timeout.clear()),
- timeout
+ timeout,
]);
}
diff --git a/test/common/tls.js b/test/common/tls.js
index 5094755c240afd..27414c79eda040 100644
--- a/test/common/tls.js
+++ b/test/common/tls.js
@@ -44,7 +44,7 @@ class TestTLSSocket extends net.Socket {
createClientHello() {
const compressions = Buffer.from('0100', 'hex'); // null
const msg = addHandshakeHeader(0x01, Buffer.concat([
- this.version, this.client_random, this.ciphers, compressions
+ this.version, this.client_random, this.ciphers, compressions,
]));
this.emit('handshake', msg);
return addRecordHeader(0x16, msg);
diff --git a/test/doctool/test-doctool-json.js b/test/doctool/test-doctool-json.js
index 84c2d8f65230d5..70e6aa50f0c568 100644
--- a/test/doctool/test-doctool-json.js
+++ b/test/doctool/test-doctool-json.js
@@ -79,7 +79,7 @@ const testData = [
name: 'array',
type: 'Array'
}]
- }
+ },
]
}],
type: 'module',
@@ -121,7 +121,7 @@ const testData = [
{ 'version': 'v4.2.0',
'pr-url': 'https://github.com/nodejs/node/pull/3276',
'description': 'The `error` parameter can now be ' +
- 'an arrow function.' }
+ 'an arrow function.' },
]
},
desc: '
Describe Foobar II
in more detail ' +
@@ -149,11 +149,11 @@ const testData = [
'Describe Something
in more detail here.
',
type: 'module',
displayName: 'Something'
- }
+ },
],
type: 'module',
displayName: 'Sample Markdown with YAML info'
- }
+ },
]
}
},
@@ -170,7 +170,7 @@ const testData = [
{
name: 'fullName',
textRaw: '`Fqhqwhgads.fullName`'
- }
+ },
],
classMethods: [
{
@@ -178,18 +178,18 @@ const testData = [
signatures: [
{
params: []
- }
+ },
],
textRaw: 'Static method: `Fhqwhgads.again()`',
type: 'classMethod'
- }
+ },
],
classes: [
{
textRaw: 'Class: `ComeOn`',
type: 'class',
name: 'ComeOn'
- }
+ },
],
ctors: [
{
@@ -197,11 +197,11 @@ const testData = [
signatures: [
{
params: []
- }
+ },
],
textRaw: 'Constructor: `new Fhqwhgads()`',
type: 'ctor'
- }
+ },
],
methods: [
{
@@ -209,7 +209,7 @@ const testData = [
type: 'method',
name: 'to',
signatures: [{ params: [] }]
- }
+ },
],
events: [
{
@@ -217,14 +217,14 @@ const testData = [
type: 'event',
name: 'FHQWHfest',
params: []
- }
+ },
],
type: 'module',
displayName: 'Fhqwhgads'
- }
+ },
]
}
- }
+ },
];
testData.forEach((item) => {
diff --git a/test/es-module/test-esm-exports-pending-deprecations.mjs b/test/es-module/test-esm-exports-pending-deprecations.mjs
index ea7665fceb430d..c5bcb17740c536 100644
--- a/test/es-module/test-esm-exports-pending-deprecations.mjs
+++ b/test/es-module/test-esm-exports-pending-deprecations.mjs
@@ -8,7 +8,7 @@ const expectedWarnings = [
'"./fallbackdir/"',
'"./subpath/"',
'no_exports',
- 'default_index'
+ 'default_index',
];
process.addListener('warning', mustCall((warning) => {
diff --git a/test/es-module/test-esm-json.mjs b/test/es-module/test-esm-json.mjs
index ddcc7cb33e709f..df4f75fbd6e067 100644
--- a/test/es-module/test-esm-json.mjs
+++ b/test/es-module/test-esm-json.mjs
@@ -11,7 +11,7 @@ strictEqual(secret.ofLife, 42);
// Test warning message
const child = spawn(process.execPath, [
'--experimental-json-modules',
- path('/es-modules/json-modules.mjs')
+ path('/es-modules/json-modules.mjs'),
]);
let stderr = '';
diff --git a/test/es-module/test-esm-nowarn-exports.mjs b/test/es-module/test-esm-nowarn-exports.mjs
index 5e0927f4674f84..57d5bc58c72356 100644
--- a/test/es-module/test-esm-nowarn-exports.mjs
+++ b/test/es-module/test-esm-nowarn-exports.mjs
@@ -5,7 +5,7 @@ import { spawn } from 'child_process';
const child = spawn(process.execPath, [
'--experimental-import-meta-resolve',
- path('/es-modules/import-resolve-exports.mjs')
+ path('/es-modules/import-resolve-exports.mjs'),
]);
let stderr = '';
diff --git a/test/es-module/test-esm-preserve-symlinks-main.js b/test/es-module/test-esm-preserve-symlinks-main.js
index 877066a6a4548e..b8fb301e02d85b 100644
--- a/test/es-module/test-esm-preserve-symlinks-main.js
+++ b/test/es-module/test-esm-preserve-symlinks-main.js
@@ -42,7 +42,7 @@ function doTest(flags, done) {
spawn(process.execPath,
flags.concat([
'--preserve-symlinks',
- '--preserve-symlinks-main', entry_link_absolute_path
+ '--preserve-symlinks-main', entry_link_absolute_path,
]),
{ stdio: 'inherit' }).on('exit', (code) => {
assert.strictEqual(code, 0);
diff --git a/test/es-module/test-esm-repl.js b/test/es-module/test-esm-repl.js
index 653927b241694e..872d2c1f6ef8f4 100644
--- a/test/es-module/test-esm-repl.js
+++ b/test/es-module/test-esm-repl.js
@@ -4,7 +4,7 @@ const assert = require('assert');
const { spawn } = require('child_process');
const child = spawn(process.execPath, [
- '--interactive'
+ '--interactive',
]);
child.stdin.end(`
import('fs').then(
diff --git a/test/es-module/test-esm-specifiers.mjs b/test/es-module/test-esm-specifiers.mjs
index 8451a6a703bb65..bc6125f5f94ad9 100644
--- a/test/es-module/test-esm-specifiers.mjs
+++ b/test/es-module/test-esm-specifiers.mjs
@@ -51,7 +51,7 @@ main().catch(mustNotCall);
);
[
'--experimental-specifier-resolution',
- '--es-module-specifier-resolution'
+ '--es-module-specifier-resolution',
].forEach((option) => {
spawn(process.execPath,
[`${option}=node`, modulePath],
diff --git a/test/es-module/test-esm-symlink-type.js b/test/es-module/test-esm-symlink-type.js
index 1f46dce17f2e46..2537881f46c0e2 100644
--- a/test/es-module/test-esm-symlink-type.js
+++ b/test/es-module/test-esm-symlink-type.js
@@ -40,7 +40,7 @@ const symlinks = [
target: fixtures.path('es-modules/package-without-type/index.js'),
prints: 'package-without-type',
errorsWithPreserveSymlinksMain: false
- }
+ },
];
symlinks.forEach((symlink) => {
@@ -49,7 +49,7 @@ symlinks.forEach((symlink) => {
const flags = [
'',
- '--preserve-symlinks-main'
+ '--preserve-symlinks-main',
];
flags.forEach((nodeOptions) => {
const opts = {
diff --git a/test/es-module/test-esm-wasm.mjs b/test/es-module/test-esm-wasm.mjs
index b2218ce2f09893..877a841850dc4f 100644
--- a/test/es-module/test-esm-wasm.mjs
+++ b/test/es-module/test-esm-wasm.mjs
@@ -19,7 +19,7 @@ strictEqual(addImported(1), 43);
// Test warning message
const child = spawn(process.execPath, [
'--experimental-wasm-modules',
- path('/es-modules/wasm-modules.mjs')
+ path('/es-modules/wasm-modules.mjs'),
]);
let stderr = '';
diff --git a/test/internet/test-dgram-multicast-multi-process.js b/test/internet/test-dgram-multicast-multi-process.js
index 9d2e2c9f3ffd84..e19f8dc05b747a 100644
--- a/test/internet/test-dgram-multicast-multi-process.js
+++ b/test/internet/test-dgram-multicast-multi-process.js
@@ -35,7 +35,7 @@ const messages = [
Buffer.from('First message to send'),
Buffer.from('Second message to send'),
Buffer.from('Third message to send'),
- Buffer.from('Fourth message to send')
+ Buffer.from('Fourth message to send'),
];
const workers = {};
const listeners = 3;
diff --git a/test/internet/test-dgram-multicast-set-interface-lo.js b/test/internet/test-dgram-multicast-set-interface-lo.js
index e06969b7b23673..11c3d47cff0637 100644
--- a/test/internet/test-dgram-multicast-set-interface-lo.js
+++ b/test/internet/test-dgram-multicast-set-interface-lo.js
@@ -70,7 +70,7 @@ const messages = [
{ tail: 'Fourth message to send', mcast: MULTICASTS[FAM][2] },
{ tail: 'Fifth message to send', mcast: MULTICASTS[FAM][1], rcv: true },
{ tail: 'Sixth message to send', mcast: MULTICASTS[FAM][2], rcv: true,
- newAddr: LOOPBACK[FAM] }
+ newAddr: LOOPBACK[FAM] },
];
diff --git a/test/internet/test-dgram-multicast-ssm-multi-process.js b/test/internet/test-dgram-multicast-ssm-multi-process.js
index 1771a4204c137b..5653559e243c7a 100644
--- a/test/internet/test-dgram-multicast-ssm-multi-process.js
+++ b/test/internet/test-dgram-multicast-ssm-multi-process.js
@@ -14,7 +14,7 @@ const messages = [
Buffer.from('First message to send'),
Buffer.from('Second message to send'),
Buffer.from('Third message to send'),
- Buffer.from('Fourth message to send')
+ Buffer.from('Fourth message to send'),
];
const workers = {};
const listeners = 3;
diff --git a/test/internet/test-dgram-multicast-ssmv6-multi-process.js b/test/internet/test-dgram-multicast-ssmv6-multi-process.js
index 88bb563364bfe3..e139d93a971a28 100644
--- a/test/internet/test-dgram-multicast-ssmv6-multi-process.js
+++ b/test/internet/test-dgram-multicast-ssmv6-multi-process.js
@@ -14,7 +14,7 @@ const messages = [
Buffer.from('First message to send'),
Buffer.from('Second message to send'),
Buffer.from('Third message to send'),
- Buffer.from('Fourth message to send')
+ Buffer.from('Fourth message to send'),
];
const workers = {};
const listeners = 3;
diff --git a/test/internet/test-dns-cares-domains.js b/test/internet/test-dns-cares-domains.js
index 6609758a7daf17..4a8e0eee71ba72 100644
--- a/test/internet/test-dns-cares-domains.js
+++ b/test/internet/test-dns-cares-domains.js
@@ -15,7 +15,7 @@ const methods = [
'resolveSrv',
'resolvePtr',
'resolveNaptr',
- 'resolveSoa'
+ 'resolveSoa',
];
methods.forEach(function(method) {
diff --git a/test/internet/test-trace-events-dns.js b/test/internet/test-trace-events-dns.js
index 8c6bd249cbf2a7..529665f907b0c9 100644
--- a/test/internet/test-trace-events-dns.js
+++ b/test/internet/test-trace-events-dns.js
@@ -45,7 +45,7 @@ for (const tr in tests) {
[ '--trace-event-categories',
'node.dns.native',
'-e',
- test_str + tests[tr]
+ test_str + tests[tr],
],
{ encoding: 'utf8' });
diff --git a/test/js-native-api/test_array/test.js b/test/js-native-api/test_array/test.js
index 4ec05596cf63bc..c2a6b11a6074d5 100644
--- a/test/js-native-api/test_array/test.js
+++ b/test/js-native-api/test_array/test.js
@@ -15,8 +15,8 @@ const array = [
[
'world',
'node',
- 'abi'
- ]
+ 'abi',
+ ],
];
assert.throws(
diff --git a/test/js-native-api/test_exception/testFinalizerException.js b/test/js-native-api/test_exception/testFinalizerException.js
index 1ba74ba4802a0f..7ed2504fee9c11 100644
--- a/test/js-native-api/test_exception/testFinalizerException.js
+++ b/test/js-native-api/test_exception/testFinalizerException.js
@@ -26,7 +26,7 @@ if (process.argv[2] === 'child') {
const assert = require('assert');
const { spawnSync } = require('child_process');
const child = spawnSync(process.execPath, [
- '--expose-gc', __filename, 'child'
+ '--expose-gc', __filename, 'child',
]);
assert.strictEqual(child.signal, null);
assert.match(child.stderr.toString(), /Error during Finalize/m);
diff --git a/test/js-native-api/test_general/test.js b/test/js-native-api/test_general/test.js
index 76527bc81c7cd8..ec5c4fe0ddc86f 100644
--- a/test/js-native-api/test_general/test.js
+++ b/test/js-native-api/test_general/test.js
@@ -42,7 +42,7 @@ assert.strictEqual(test_general.testGetVersion(), 8);
new Object(),
true,
undefined,
- Symbol()
+ Symbol(),
].forEach((val) => {
assert.strictEqual(test_general.testNapiTypeof(val), typeof val);
});
diff --git a/test/js-native-api/test_object/test.js b/test/js-native-api/test_object/test.js
index e5923ecd16c2cf..807c920bd46b54 100644
--- a/test/js-native-api/test_object/test.js
+++ b/test/js-native-api/test_object/test.js
@@ -9,7 +9,7 @@ const test_object = require(`./build/${common.buildType}/test_object`);
const object = {
hello: 'world',
array: [
- 1, 94, 'str', 12.321, { test: 'obj in arr' }
+ 1, 94, 'str', 12.321, { test: 'obj in arr' },
],
newObject: {
test: 'obj in obj'
diff --git a/test/message/2100bytes.js b/test/message/2100bytes.js
index ff1b51f4653394..abd8c4b55246ae 100644
--- a/test/message/2100bytes.js
+++ b/test/message/2100bytes.js
@@ -64,5 +64,5 @@ console.log([
'_____________________________________________1950',
'_____________________________________________2000',
'_____________________________________________2050',
- '_____________________________________________2100'
+ '_____________________________________________2100',
].join('\n'));
diff --git a/test/message/async_error_eval_cjs.js b/test/message/async_error_eval_cjs.js
index a2caaa0937745e..820507beda9937 100644
--- a/test/message/async_error_eval_cjs.js
+++ b/test/message/async_error_eval_cjs.js
@@ -27,7 +27,7 @@ main();
{
const child = spawnSync(process.execPath, [
'-e',
- main
+ main,
], {
env: { ...process.env }
});
diff --git a/test/message/async_error_eval_esm.js b/test/message/async_error_eval_esm.js
index 0c9b7378d54729..dfab2b8a8264e9 100644
--- a/test/message/async_error_eval_esm.js
+++ b/test/message/async_error_eval_esm.js
@@ -29,7 +29,7 @@ main();
'--input-type',
'module',
'-e',
- main
+ main,
], {
env: { ...process.env }
});
diff --git a/test/message/esm_loader_not_found_cjs_hint_bare.js b/test/message/esm_loader_not_found_cjs_hint_bare.js
index b049fd203fef06..437fa2d3d430a1 100644
--- a/test/message/esm_loader_not_found_cjs_hint_bare.js
+++ b/test/message/esm_loader_not_found_cjs_hint_bare.js
@@ -8,7 +8,7 @@ const { fixturesDir } = require('../common/fixtures');
spawn(
process.execPath,
[
- join(fixturesDir, 'esm_loader_not_found_cjs_hint_bare.mjs')
+ join(fixturesDir, 'esm_loader_not_found_cjs_hint_bare.mjs'),
],
{
cwd: fixturesDir,
diff --git a/test/node-api/test_async/test-async-hooks.js b/test/node-api/test_async/test-async-hooks.js
index db6e0cbd1679e6..e7879c5ad2b686 100644
--- a/test/node-api/test_async/test-async-hooks.js
+++ b/test/node-api/test_async/test-async-hooks.js
@@ -55,6 +55,6 @@ process.on('exit', () => {
{ type: 'before', id: testId },
{ type: 'complete' },
{ type: 'after', id: testId },
- { type: 'destroy', id: testId }
+ { type: 'destroy', id: testId },
]);
});
diff --git a/test/node-api/test_policy/test_policy.js b/test/node-api/test_policy/test_policy.js
index b3f477567e37ba..b69dbded585891 100644
--- a/test/node-api/test_policy/test_policy.js
+++ b/test/node-api/test_policy/test_policy.js
@@ -44,7 +44,7 @@ function test(shouldFail, resources) {
const { status, stdout, stderr } = spawnSync(process.execPath, [
'--experimental-policy',
policyFilepath,
- depFilepath
+ depFilepath,
]);
console.log(stdout.toString(), stderr.toString());
diff --git a/test/parallel/test-abortcontroller.js b/test/parallel/test-abortcontroller.js
index d26ec8641a671e..2f4fb495c75590 100644
--- a/test/parallel/test-abortcontroller.js
+++ b/test/parallel/test-abortcontroller.js
@@ -92,7 +92,7 @@ const { ok, strictEqual, throws } = require('assert');
NaN,
true,
'AbortController',
- Object.create(AbortController.prototype)
+ Object.create(AbortController.prototype),
];
for (const badController of badAbortControllers) {
throws(
@@ -123,7 +123,7 @@ const { ok, strictEqual, throws } = require('assert');
NaN,
true,
'AbortSignal',
- Object.create(AbortSignal.prototype)
+ Object.create(AbortSignal.prototype),
];
for (const badSignal of badAbortSignals) {
throws(
diff --git a/test/parallel/test-assert-deep.js b/test/parallel/test-assert-deep.js
index b14179c85c8a8f..c74ca48d26cb74 100644
--- a/test/parallel/test-assert-deep.js
+++ b/test/parallel/test-assert-deep.js
@@ -164,7 +164,7 @@ assert.throws(
new Int32Array([1]), // Int32Array
new Uint32Array([1]), // Uint32Array
Buffer.from([1]), // Uint8Array
- (function() { return arguments; })(1)
+ (function() { return arguments; })(1),
]);
for (const a of similar) {
diff --git a/test/parallel/test-assert-typedarray-deepequal.js b/test/parallel/test-assert-typedarray-deepequal.js
index 6be4c10595ab45..a31da2739af93e 100644
--- a/test/parallel/test-assert-typedarray-deepequal.js
+++ b/test/parallel/test-assert-typedarray-deepequal.js
@@ -25,12 +25,12 @@ const equalArrayPairs = [
[new Uint16Array([1, 2, 3, 4]).subarray(1), new Uint16Array([2, 3, 4])],
[new Uint32Array([1, 2, 3, 4]).subarray(1, 3), new Uint32Array([2, 3])],
[new ArrayBuffer(3), new ArrayBuffer(3)],
- [new SharedArrayBuffer(3), new SharedArrayBuffer(3)]
+ [new SharedArrayBuffer(3), new SharedArrayBuffer(3)],
];
const looseEqualArrayPairs = [
[new Float32Array([+0.0]), new Float32Array([-0.0])],
- [new Float64Array([+0.0]), new Float64Array([-0.0])]
+ [new Float64Array([+0.0]), new Float64Array([-0.0])],
];
const notEqualArrayPairs = [
@@ -52,15 +52,15 @@ const notEqualArrayPairs = [
[new Uint8Array([1, 2, 3]).buffer, new Uint8Array([4, 5, 6]).buffer],
[
new Uint8Array(new SharedArrayBuffer(3)).fill(1).buffer,
- new Uint8Array(new SharedArrayBuffer(3)).fill(2).buffer
+ new Uint8Array(new SharedArrayBuffer(3)).fill(2).buffer,
],
[new ArrayBuffer(2), new ArrayBuffer(3)],
[new SharedArrayBuffer(2), new SharedArrayBuffer(3)],
[new ArrayBuffer(2), new SharedArrayBuffer(3)],
[
new Uint8Array(new ArrayBuffer(3)).fill(1).buffer,
- new Uint8Array(new SharedArrayBuffer(3)).fill(2).buffer
- ]
+ new Uint8Array(new SharedArrayBuffer(3)).fill(2).buffer,
+ ],
];
equalArrayPairs.forEach((arrayPair) => {
diff --git a/test/parallel/test-assert.js b/test/parallel/test-assert.js
index 7613449c92b477..80a55094b73ecf 100644
--- a/test/parallel/test-assert.js
+++ b/test/parallel/test-assert.js
@@ -592,7 +592,7 @@ a.throws(
'...',
' 1,',
' 1',
- ' ]'
+ ' ]',
].join('\n');
assert.throws(
() => assert.deepEqual(
@@ -613,7 +613,7 @@ a.throws(
' 1,',
' 1,',
' 1',
- ' ]'
+ ' ]',
].join('\n');
assert.throws(
() => assert.deepEqual(
@@ -634,7 +634,7 @@ a.throws(
' 0,',
'+ 1,',
' 1',
- ' ]'
+ ' ]',
].join('\n');
assert.throws(
() => assert.deepEqual(
@@ -665,7 +665,7 @@ a.throws(
'+ 1,',
' 2,',
' 1',
- ' ]'
+ ' ]',
].join('\n');
assert.throws(
() => assert.deepEqual([1, 2, 1], [2, 1]),
@@ -946,7 +946,7 @@ assert.throws(
[
1,
false,
- Symbol()
+ Symbol(),
].forEach((input) => {
assert.throws(
() => assert.throws(() => {}, input),
diff --git a/test/parallel/test-binding-constants.js b/test/parallel/test-binding-constants.js
index e989e09b3cd7d6..4a96b7c7443fc6 100644
--- a/test/parallel/test-binding-constants.js
+++ b/test/parallel/test-binding-constants.js
@@ -29,5 +29,5 @@ function test(obj) {
[
constants, constants.crypto, constants.fs, constants.os, constants.trace,
- constants.zlib, constants.os.dlopen, constants.os.errno, constants.os.signals
+ constants.zlib, constants.os.dlopen, constants.os.errno, constants.os.signals,
].forEach(test);
diff --git a/test/parallel/test-blob.js b/test/parallel/test-blob.js
index ab13d5965946d6..359ce3ba214412 100644
--- a/test/parallel/test-blob.js
+++ b/test/parallel/test-blob.js
@@ -100,7 +100,7 @@ assert.throws(() => new Blob({}), {
'e',
'l',
'lo',
- Buffer.from('world')
+ Buffer.from('world'),
]);
assert.strictEqual(b.size, 10);
b.text().then(common.mustCall((text) => {
diff --git a/test/parallel/test-blocklist.js b/test/parallel/test-blocklist.js
index 0d537574c72e11..9ea376089e2894 100644
--- a/test/parallel/test-blocklist.js
+++ b/test/parallel/test-blocklist.js
@@ -107,7 +107,7 @@ const util = require('util');
const rulesCheck = [
'Subnet: IPv6 8592:757c:efae:4e45::/64',
'Range: IPv4 10.0.0.1-10.0.0.10',
- 'Address: IPv4 1.1.1.1'
+ 'Address: IPv4 1.1.1.1',
];
assert.deepStrictEqual(blockList.rules, rulesCheck);
console.log(blockList);
diff --git a/test/parallel/test-buffer-backing-arraybuffer.js b/test/parallel/test-buffer-backing-arraybuffer.js
index 75dcd60068d5ab..86fdf92181788f 100644
--- a/test/parallel/test-buffer-backing-arraybuffer.js
+++ b/test/parallel/test-buffer-backing-arraybuffer.js
@@ -20,7 +20,7 @@ for (const { length, expectOnHeap } of tests) {
new Float32Array(length / 4),
new Float64Array(length / 8),
Buffer.alloc(length),
- Buffer.allocUnsafeSlow(length)
+ Buffer.allocUnsafeSlow(length),
// Buffer.allocUnsafe() is missing because it may use pooled allocations.
];
diff --git a/test/parallel/test-buffer-bytelength.js b/test/parallel/test-buffer-bytelength.js
index 2355e4e0a0b442..33cbb3268440a1 100644
--- a/test/parallel/test-buffer-bytelength.js
+++ b/test/parallel/test-buffer-bytelength.js
@@ -9,7 +9,7 @@ const vm = require('vm');
[32, 'latin1'],
[NaN, 'utf8'],
[{}, 'latin1'],
- []
+ [],
].forEach((args) => {
assert.throws(
() => Buffer.byteLength(...args),
diff --git a/test/parallel/test-buffer-failed-alloc-typed-arrays.js b/test/parallel/test-buffer-failed-alloc-typed-arrays.js
index 9e480a5c8d3853..3e91b31ccaf6f3 100644
--- a/test/parallel/test-buffer-failed-alloc-typed-arrays.js
+++ b/test/parallel/test-buffer-failed-alloc-typed-arrays.js
@@ -18,7 +18,7 @@ const allocators = [
SlowBuffer,
Buffer.alloc,
Buffer.allocUnsafe,
- Buffer.allocUnsafeSlow
+ Buffer.allocUnsafeSlow,
];
for (const allocator of allocators) {
for (const size of sizes) {
diff --git a/test/parallel/test-buffer-fill.js b/test/parallel/test-buffer-fill.js
index 6e7b24989a53bb..00e65c82e91849 100644
--- a/test/parallel/test-buffer-fill.js
+++ b/test/parallel/test-buffer-fill.js
@@ -205,7 +205,7 @@ assert.throws(
[
['a', 0, 0, NaN],
- ['a', 0, 0, false]
+ ['a', 0, 0, false],
].forEach((args) => {
assert.throws(
() => buf1.fill(...args),
diff --git a/test/parallel/test-buffer-from.js b/test/parallel/test-buffer-from.js
index 165b38893f9e99..b513f4080a2054 100644
--- a/test/parallel/test-buffer-from.js
+++ b/test/parallel/test-buffer-from.js
@@ -47,7 +47,7 @@ deepStrictEqual(
5n,
(one, two, three) => {},
undefined,
- null
+ null,
].forEach((input) => {
const errObj = {
code: 'ERR_INVALID_ARG_TYPE',
diff --git a/test/parallel/test-buffer-includes.js b/test/parallel/test-buffer-includes.js
index 5d74303fad6350..57b3a33aaa487f 100644
--- a/test/parallel/test-buffer-includes.js
+++ b/test/parallel/test-buffer-includes.js
@@ -275,7 +275,7 @@ for (let lengthIndex = 0; lengthIndex < lengths.length; lengthIndex++) {
[
() => { },
{},
- []
+ [],
].forEach((val) => {
assert.throws(
() => b.includes(val),
diff --git a/test/parallel/test-buffer-indexof.js b/test/parallel/test-buffer-indexof.js
index b17520366e506a..82d359ca213f2c 100644
--- a/test/parallel/test-buffer-indexof.js
+++ b/test/parallel/test-buffer-indexof.js
@@ -350,7 +350,7 @@ assert.strictEqual(Buffer.from('aaaaa').indexOf('b', 'ucs2'), -1);
[
() => {},
{},
- []
+ [],
].forEach((val) => {
assert.throws(
() => b.indexOf(val),
diff --git a/test/parallel/test-buffer-isencoding.js b/test/parallel/test-buffer-isencoding.js
index 1a9e17dc48714d..f9150055cc3a5c 100644
--- a/test/parallel/test-buffer-isencoding.js
+++ b/test/parallel/test-buffer-isencoding.js
@@ -15,7 +15,7 @@ const assert = require('assert');
'ucs2',
'ucs-2',
'utf16le',
- 'utf-16le'
+ 'utf-16le',
].forEach((enc) => {
assert.strictEqual(Buffer.isEncoding(enc), true);
});
@@ -32,7 +32,7 @@ const assert = require('assert');
[],
1,
0,
- -1
+ -1,
].forEach((enc) => {
assert.strictEqual(Buffer.isEncoding(enc), false);
});
diff --git a/test/parallel/test-buffer-iterator.js b/test/parallel/test-buffer-iterator.js
index 0016b021c078bf..6cf64712c0f447 100644
--- a/test/parallel/test-buffer-iterator.js
+++ b/test/parallel/test-buffer-iterator.js
@@ -58,5 +58,5 @@ assert.deepStrictEqual(arr, [
[1, 2],
[2, 3],
[3, 4],
- [4, 5]
+ [4, 5],
]);
diff --git a/test/parallel/test-buffer-slice.js b/test/parallel/test-buffer-slice.js
index f40a495b206079..05cbfba4733829 100644
--- a/test/parallel/test-buffer-slice.js
+++ b/test/parallel/test-buffer-slice.js
@@ -59,7 +59,7 @@ const expectedSameBufs = [
[buf.slice('-10', '-5'), Buffer.from('01234', 'utf8')],
[buf.slice('-10', '-0'), Buffer.from('', 'utf8')],
[buf.slice('111'), Buffer.from('', 'utf8')],
- [buf.slice('0', '-111'), Buffer.from('', 'utf8')]
+ [buf.slice('0', '-111'), Buffer.from('', 'utf8')],
];
for (let i = 0, s = buf.toString(); i < buf.length; ++i) {
@@ -114,13 +114,13 @@ assert.strictEqual(Buffer.from('hello', 'utf8').slice(0, 0).length, 0);
{
const buf = Buffer.from([
1, 29, 0, 0, 1, 143, 216, 162, 92, 254, 248, 63, 0,
- 0, 0, 18, 184, 6, 0, 175, 29, 0, 8, 11, 1, 0, 0
+ 0, 0, 18, 184, 6, 0, 175, 29, 0, 8, 11, 1, 0, 0,
]);
const chunk1 = Buffer.from([
- 1, 29, 0, 0, 1, 143, 216, 162, 92, 254, 248, 63, 0
+ 1, 29, 0, 0, 1, 143, 216, 162, 92, 254, 248, 63, 0,
]);
const chunk2 = Buffer.from([
- 0, 0, 18, 184, 6, 0, 175, 29, 0, 8, 11, 1, 0, 0
+ 0, 0, 18, 184, 6, 0, 175, 29, 0, 8, 11, 1, 0, 0,
]);
const middle = buf.length / 2;
diff --git a/test/parallel/test-buffer-write.js b/test/parallel/test-buffer-write.js
index 3a4a3a8b696612..128327c47e5d6f 100644
--- a/test/parallel/test-buffer-write.js
+++ b/test/parallel/test-buffer-write.js
@@ -24,7 +24,7 @@ const resultMap = new Map([
['utf16le', Buffer.from([102, 0, 111, 0, 111, 0, 0, 0, 0])],
['base64', Buffer.from([102, 111, 111, 0, 0, 0, 0, 0, 0])],
['base64url', Buffer.from([102, 111, 111, 0, 0, 0, 0, 0, 0])],
- ['hex', Buffer.from([102, 111, 111, 0, 0, 0, 0, 0, 0])]
+ ['hex', Buffer.from([102, 111, 111, 0, 0, 0, 0, 0, 0])],
]);
// utf8, ucs2, ascii, latin1, utf16le
diff --git a/test/parallel/test-buffer-writedouble.js b/test/parallel/test-buffer-writedouble.js
index 3f156d8297d40e..5026c8187430b3 100644
--- a/test/parallel/test-buffer-writedouble.js
+++ b/test/parallel/test-buffer-writedouble.js
@@ -11,35 +11,35 @@ buffer.writeDoubleBE(2.225073858507201e-308, 0);
buffer.writeDoubleLE(2.225073858507201e-308, 8);
assert.ok(buffer.equals(new Uint8Array([
0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00,
])));
buffer.writeDoubleBE(1.0000000000000004, 0);
buffer.writeDoubleLE(1.0000000000000004, 8);
assert.ok(buffer.equals(new Uint8Array([
0x3f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
- 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f,
])));
buffer.writeDoubleBE(-2, 0);
buffer.writeDoubleLE(-2, 8);
assert.ok(buffer.equals(new Uint8Array([
0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
])));
buffer.writeDoubleBE(1.7976931348623157e+308, 0);
buffer.writeDoubleLE(1.7976931348623157e+308, 8);
assert.ok(buffer.equals(new Uint8Array([
0x7f, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0x7f
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0x7f,
])));
buffer.writeDoubleBE(0 * -1, 0);
buffer.writeDoubleLE(0 * -1, 8);
assert.ok(buffer.equals(new Uint8Array([
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
])));
buffer.writeDoubleBE(Infinity, 0);
@@ -47,7 +47,7 @@ buffer.writeDoubleLE(Infinity, 8);
assert.ok(buffer.equals(new Uint8Array([
0x7F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x7F
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x7F,
])));
assert.strictEqual(buffer.readDoubleBE(0), Infinity);
@@ -58,7 +58,7 @@ buffer.writeDoubleLE(-Infinity, 8);
assert.ok(buffer.equals(new Uint8Array([
0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF,
])));
assert.strictEqual(buffer.readDoubleBE(0), -Infinity);
@@ -72,12 +72,12 @@ buffer.writeDoubleLE(NaN, 8);
if (buffer[1] === 0xF7) {
assert.ok(buffer.equals(new Uint8Array([
0x7F, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x7F
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x7F,
])));
} else {
assert.ok(buffer.equals(new Uint8Array([
0x7F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x7F
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x7F,
])));
}
diff --git a/test/parallel/test-buffer-writeint.js b/test/parallel/test-buffer-writeint.js
index 4799fb33d77b60..e4b916b1cff27f 100644
--- a/test/parallel/test-buffer-writeint.js
+++ b/test/parallel/test-buffer-writeint.js
@@ -107,32 +107,32 @@ const errorOutOfBounds = {
buffer.writeInt32BE(0x23, 0);
buffer.writeInt32LE(0x23, 4);
assert.ok(buffer.equals(new Uint8Array([
- 0x00, 0x00, 0x00, 0x23, 0x23, 0x00, 0x00, 0x00
+ 0x00, 0x00, 0x00, 0x23, 0x23, 0x00, 0x00, 0x00,
])));
buffer.writeInt32BE(-5, 0);
buffer.writeInt32LE(-5, 4);
assert.ok(buffer.equals(new Uint8Array([
- 0xff, 0xff, 0xff, 0xfb, 0xfb, 0xff, 0xff, 0xff
+ 0xff, 0xff, 0xff, 0xfb, 0xfb, 0xff, 0xff, 0xff,
])));
buffer.writeInt32BE(-805306713, 0);
buffer.writeInt32LE(-805306713, 4);
assert.ok(buffer.equals(new Uint8Array([
- 0xcf, 0xff, 0xfe, 0xa7, 0xa7, 0xfe, 0xff, 0xcf
+ 0xcf, 0xff, 0xfe, 0xa7, 0xa7, 0xfe, 0xff, 0xcf,
])));
/* Make sure we handle min/max correctly */
buffer.writeInt32BE(0x7fffffff, 0);
buffer.writeInt32BE(-0x80000000, 4);
assert.ok(buffer.equals(new Uint8Array([
- 0x7f, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00
+ 0x7f, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00,
])));
buffer.writeInt32LE(0x7fffffff, 0);
buffer.writeInt32LE(-0x80000000, 4);
assert.ok(buffer.equals(new Uint8Array([
- 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x80
+ 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x80,
])));
['writeInt32BE', 'writeInt32LE'].forEach((fn) => {
@@ -168,12 +168,12 @@ const errorOutOfBounds = {
const buffer = Buffer.allocUnsafe(6);
buffer.writeIntBE(value, 0, 6);
assert.ok(buffer.equals(new Uint8Array([
- 0x12, 0x34, 0x56, 0x78, 0x90, 0xab
+ 0x12, 0x34, 0x56, 0x78, 0x90, 0xab,
])));
buffer.writeIntLE(value, 0, 6);
assert.ok(buffer.equals(new Uint8Array([
- 0xab, 0x90, 0x78, 0x56, 0x34, 0x12
+ 0xab, 0x90, 0x78, 0x56, 0x34, 0x12,
])));
}
diff --git a/test/parallel/test-buffer-zero-fill-cli.js b/test/parallel/test-buffer-zero-fill-cli.js
index 2f3b243c470c3c..4299f81039b0b5 100644
--- a/test/parallel/test-buffer-zero-fill-cli.js
+++ b/test/parallel/test-buffer-zero-fill-cli.js
@@ -24,7 +24,7 @@ for (let i = 0; i < 50; i++) {
Buffer.allocUnsafe(20),
SlowBuffer(20),
Buffer(20),
- new SlowBuffer(20)
+ new SlowBuffer(20),
];
for (const buf of bufs) {
assert(isZeroFilled(buf));
diff --git a/test/parallel/test-child-process-can-write-to-stdout.js b/test/parallel/test-child-process-can-write-to-stdout.js
index bb9ddb71c827bc..069e07fb160282 100644
--- a/test/parallel/test-child-process-can-write-to-stdout.js
+++ b/test/parallel/test-child-process-can-write-to-stdout.js
@@ -8,7 +8,7 @@ const assert = require('assert');
const spawn = require('child_process').spawn;
const child = spawn(process.argv[0], [
- fixtures.path('GH-1899-output.js')
+ fixtures.path('GH-1899-output.js'),
]);
let output = '';
diff --git a/test/parallel/test-child-process-exec-timeout.js b/test/parallel/test-child-process-exec-timeout.js
index ba64dad101724a..64648d62bb3284 100644
--- a/test/parallel/test-child-process-exec-timeout.js
+++ b/test/parallel/test-child-process-exec-timeout.js
@@ -67,7 +67,7 @@ if (common.isWindows) {
'where',
`commandline like '%${basename}%child'`,
'delete',
- '/nointeractive'
+ '/nointeractive',
]);
});
}
diff --git a/test/parallel/test-child-process-execfilesync-maxbuf.js b/test/parallel/test-child-process-execfilesync-maxbuf.js
index 9af7c0ed8dedb1..63f8cc26ebb4d3 100644
--- a/test/parallel/test-child-process-execfilesync-maxbuf.js
+++ b/test/parallel/test-child-process-execfilesync-maxbuf.js
@@ -12,7 +12,7 @@ const msgOutBuf = Buffer.from(`${msgOut}\n`);
const args = [
'-e',
- `console.log("${msgOut}");`
+ `console.log("${msgOut}");`,
];
// Verify that an error is returned if maxBuffer is surpassed.
diff --git a/test/parallel/test-child-process-execsync-maxbuf.js b/test/parallel/test-child-process-execsync-maxbuf.js
index 0aafd1a74bdac4..62b211cc3a3de1 100644
--- a/test/parallel/test-child-process-execsync-maxbuf.js
+++ b/test/parallel/test-child-process-execsync-maxbuf.js
@@ -12,7 +12,7 @@ const msgOutBuf = Buffer.from(`${msgOut}\n`);
const args = [
'-e',
- `"console.log('${msgOut}')";`
+ `"console.log('${msgOut}')";`,
];
// Verify that an error is returned if maxBuffer is surpassed.
diff --git a/test/parallel/test-child-process-fork-args.js b/test/parallel/test-child-process-fork-args.js
index 02a8db5fa60b61..68863ffb14b747 100644
--- a/test/parallel/test-child-process-fork-args.js
+++ b/test/parallel/test-child-process-fork-args.js
@@ -19,7 +19,7 @@ const expectedEnv = { foo: 'bar' };
[],
{},
() => {},
- Symbol('t')
+ Symbol('t'),
];
invalidModulePath.forEach((modulePath) => {
assert.throws(() => fork(modulePath), {
@@ -46,7 +46,7 @@ const expectedEnv = { foo: 'bar' };
0,
true,
() => {},
- Symbol('t')
+ Symbol('t'),
];
invalidSecondArgs.forEach((arg) => {
assert.throws(
@@ -89,7 +89,7 @@ const expectedEnv = { foo: 'bar' };
0,
true,
() => {},
- Symbol('t')
+ Symbol('t'),
];
invalidThirdArgs.forEach((arg) => {
assert.throws(
diff --git a/test/parallel/test-child-process-recv-handle.js b/test/parallel/test-child-process-recv-handle.js
index d6bfa0d4257f64..b67bc206ac6f7c 100644
--- a/test/parallel/test-child-process-recv-handle.js
+++ b/test/parallel/test-child-process-recv-handle.js
@@ -37,7 +37,7 @@ function primary() {
// spawn() can only create one IPC channel so we use stdin/stdout as an
// ad-hoc command channel.
const proc = spawn(process.execPath, [
- '--expose-internals', __filename, 'worker'
+ '--expose-internals', __filename, 'worker',
], {
stdio: ['pipe', 'pipe', 'pipe', 'ipc']
});
diff --git a/test/parallel/test-child-process-spawnsync-input.js b/test/parallel/test-child-process-spawnsync-input.js
index 4dce110316b30e..62ae476ae17caa 100644
--- a/test/parallel/test-child-process-spawnsync-input.js
+++ b/test/parallel/test-child-process-spawnsync-input.js
@@ -35,7 +35,7 @@ const msgErrBuf = Buffer.from(`${msgErr}\n`);
const args = [
'-e',
- `console.log("${msgOut}"); console.error("${msgErr}");`
+ `console.log("${msgOut}"); console.error("${msgErr}");`,
];
let ret;
diff --git a/test/parallel/test-child-process-spawnsync-maxbuf.js b/test/parallel/test-child-process-spawnsync-maxbuf.js
index 8d685350adda27..3f452a41e66c26 100644
--- a/test/parallel/test-child-process-spawnsync-maxbuf.js
+++ b/test/parallel/test-child-process-spawnsync-maxbuf.js
@@ -12,7 +12,7 @@ const msgOutBuf = Buffer.from(`${msgOut}\n`);
const args = [
'-e',
- `console.log("${msgOut}");`
+ `console.log("${msgOut}");`,
];
// Verify that an error is returned if maxBuffer is surpassed.
diff --git a/test/parallel/test-child-process-spawnsync.js b/test/parallel/test-child-process-spawnsync.js
index c464dbefa68e5e..9ec125ea891689 100644
--- a/test/parallel/test-child-process-spawnsync.js
+++ b/test/parallel/test-child-process-spawnsync.js
@@ -61,7 +61,7 @@ assert.deepStrictEqual(ret_err.spawnargs, ['bar']);
const stringifiedDefault = [
null,
retDefault.stdout.toString(),
- retDefault.stderr.toString()
+ retDefault.stderr.toString(),
];
assert.deepStrictEqual(retUTF8.output, stringifiedDefault);
}
diff --git a/test/parallel/test-child-process-validate-stdio.js b/test/parallel/test-child-process-validate-stdio.js
index 7aa79b88c4aecb..6775455fd6538c 100644
--- a/test/parallel/test-child-process-validate-stdio.js
+++ b/test/parallel/test-child-process-validate-stdio.js
@@ -50,7 +50,7 @@ if (common.isMainThread) {
stdio: [
{ type: 'fd', fd: 0 },
{ type: 'fd', fd: 1 },
- { type: 'fd', fd: 2 }
+ { type: 'fd', fd: 2 },
],
ipc: undefined,
ipcFd: undefined
diff --git a/test/parallel/test-cli-options-precedence.js b/test/parallel/test-cli-options-precedence.js
index f76c12043e29cd..32804d187fccc3 100644
--- a/test/parallel/test-cli-options-precedence.js
+++ b/test/parallel/test-cli-options-precedence.js
@@ -7,7 +7,7 @@ const { spawnSync } = require('child_process');
assert.strictEqual(spawnSync(process.execPath, [
'--max-http-header-size=1234',
'--max-http-header-size=5678',
- '-p', 'http.maxHeaderSize'
+ '-p', 'http.maxHeaderSize',
], {
encoding: 'utf8'
}).stdout.trim(), '5678');
@@ -15,7 +15,7 @@ assert.strictEqual(spawnSync(process.execPath, [
// The command line takes precedence over NODE_OPTIONS:
assert.strictEqual(spawnSync(process.execPath, [
'--max-http-header-size=5678',
- '-p', 'http.maxHeaderSize'
+ '-p', 'http.maxHeaderSize',
], {
encoding: 'utf8',
env: { ...process.env, NODE_OPTIONS: '--max-http-header-size=1234' }
diff --git a/test/parallel/test-cli-syntax-piped-bad.js b/test/parallel/test-cli-syntax-piped-bad.js
index abd924848fc417..d22c21cb7e1605 100644
--- a/test/parallel/test-cli-syntax-piped-bad.js
+++ b/test/parallel/test-cli-syntax-piped-bad.js
@@ -9,7 +9,7 @@ const node = process.execPath;
// Test both sets of arguments that check syntax
const syntaxArgs = [
'-c',
- '--check'
+ '--check',
];
// Match on the name of the `Error` but not the message as it is different
diff --git a/test/parallel/test-cli-syntax-piped-good.js b/test/parallel/test-cli-syntax-piped-good.js
index 43de5d32f40d40..db2e0f875d2ac7 100644
--- a/test/parallel/test-cli-syntax-piped-good.js
+++ b/test/parallel/test-cli-syntax-piped-good.js
@@ -9,7 +9,7 @@ const node = process.execPath;
// Test both sets of arguments that check syntax
const syntaxArgs = [
'-c',
- '--check'
+ '--check',
];
// Should not execute code piped from stdin with --check.
diff --git a/test/parallel/test-cluster-worker-exit.js b/test/parallel/test-cluster-worker-exit.js
index 8867696b9a413d..09e2a83701ac77 100644
--- a/test/parallel/test-cluster-worker-exit.js
+++ b/test/parallel/test-cluster-worker-exit.js
@@ -53,7 +53,7 @@ if (cluster.isWorker) {
worker_emitExit: [1, "the worker did not emit 'exit'"],
worker_state: ['disconnected', 'the worker state is incorrect'],
worker_exitedAfterDisconnect: [
- false, 'the .exitedAfterDisconnect flag is incorrect'
+ false, 'the .exitedAfterDisconnect flag is incorrect',
],
worker_died: [true, 'the worker is still running'],
worker_exitCode: [EXIT_CODE, 'the worker exited w/ incorrect exitCode'],
diff --git a/test/parallel/test-common-countdown.js b/test/parallel/test-common-countdown.js
index 6a1a2f1bbce98a..d3c0daf599670c 100644
--- a/test/parallel/test-common-countdown.js
+++ b/test/parallel/test-common-countdown.js
@@ -19,7 +19,7 @@ const failFixtures = [
[
fixtures.path('failcounter.js'),
'Mismatched function calls. Expected exactly 1, actual 0.',
- ]
+ ],
];
for (const p of failFixtures) {
diff --git a/test/parallel/test-common.js b/test/parallel/test-common.js
index 3087cc035eb4e2..24c4f8462eb767 100644
--- a/test/parallel/test-common.js
+++ b/test/parallel/test-common.js
@@ -91,11 +91,11 @@ fnAtLeast2Called3();
const failFixtures = [
[
fixtures.path('failmustcall1.js'),
- 'Mismatched function calls. Expected exactly 2, actual 1.'
+ 'Mismatched function calls. Expected exactly 2, actual 1.',
], [
fixtures.path('failmustcall2.js'),
- 'Mismatched function calls. Expected at least 2, actual 1.'
- ]
+ 'Mismatched function calls. Expected at least 2, actual 1.',
+ ],
];
for (const p of failFixtures) {
const [file, expected] = p;
diff --git a/test/parallel/test-console-tty-colors.js b/test/parallel/test-console-tty-colors.js
index e906c71c186177..0eb51c72898f7c 100644
--- a/test/parallel/test-console-tty-colors.js
+++ b/test/parallel/test-console-tty-colors.js
@@ -10,7 +10,7 @@ function check(isTTY, colorMode, expectedColorMode, inspectOptions) {
1,
{ a: 2 },
[ 'foo' ],
- { '\\a': '\\bar' }
+ { '\\a': '\\bar' },
];
let i = 0;
diff --git a/test/parallel/test-console.js b/test/parallel/test-console.js
index e5e80ee61b2777..ee2c7c82a6f8e0 100644
--- a/test/parallel/test-console.js
+++ b/test/parallel/test-console.js
@@ -49,7 +49,7 @@ common.expectWarning(
['No such label \'default\' for console.timeLog()'],
['No such label \'default\' for console.timeEnd()'],
['Label \'default\' already exists for console.time()'],
- ['Label \'test\' already exists for console.time()']
+ ['Label \'test\' already exists for console.time()'],
]
);
@@ -216,7 +216,7 @@ console.timeEnd('label3');
assert.strictEqual(console._times.size, timesMapSize);
const expectedStrings = [
- 'foo', 'foo bar', 'foo bar hop', "{ slashes: '\\\\\\\\' }", 'inspect'
+ 'foo', 'foo bar', 'foo bar hop', "{ slashes: '\\\\\\\\' }", 'inspect',
];
for (const expected of expectedStrings) {
diff --git a/test/parallel/test-crypto-authenticated.js b/test/parallel/test-crypto-authenticated.js
index da638135314fbb..d6b09b037739c8 100644
--- a/test/parallel/test-crypto-authenticated.js
+++ b/test/parallel/test-crypto-authenticated.js
@@ -69,12 +69,12 @@ const expectedWarnings = common.hasFipsCrypto ?
['Use Cipheriv for counter mode of aes-256-ccm'],
['Use Cipheriv for counter mode of aes-256-ccm'],
['Use Cipheriv for counter mode of aes-256-ccm'],
- ['Use Cipheriv for counter mode of aes-256-ccm']
+ ['Use Cipheriv for counter mode of aes-256-ccm'],
];
const expectedDeprecationWarnings = [
['crypto.DEFAULT_ENCODING is deprecated.', 'DEP0091'],
- ['crypto.createCipher is deprecated.', 'DEP0106']
+ ['crypto.createCipher is deprecated.', 'DEP0106'],
];
common.expectWarning({
@@ -311,7 +311,7 @@ for (const test of TEST_CASES) {
decipher.setAuthTag(Buffer.from('445352d3ff85cf94', 'hex'));
const text = Buffer.concat([
decipher.update('3a2a3647', 'hex'),
- decipher.final()
+ decipher.final(),
]);
assert.strictEqual(text.toString('utf8'), 'node');
}
@@ -612,7 +612,7 @@ for (const test of TEST_CASES) {
// Decryption should still work.
const plaintext = Buffer.concat([
decipher.update(ciphertext),
- decipher.final()
+ decipher.final(),
]);
assert(plain.equals(plaintext));
}
diff --git a/test/parallel/test-crypto-binary-default.js b/test/parallel/test-crypto-binary-default.js
index ada50d6b9c9656..3bbca5b0da395b 100644
--- a/test/parallel/test-crypto-binary-default.js
+++ b/test/parallel/test-crypto-binary-default.js
@@ -214,7 +214,7 @@ assert.throws(function() {
'20cdc944b6022cac3c4982b10d5eeb55c3e4de15134676fb6de04460' +
'65c97440fa8c6a58'
}
- }
+ },
];
for (const testCase of rfc4231) {
@@ -286,7 +286,7 @@ assert.throws(function() {
'Test Using Larger Than Block-Size Key and Larger Than One ' +
'Block-Size Data',
hmac: '6f630fad67cda0ee1fb1f562db3aa53e'
- }
+ },
];
const rfc2202_sha1 = [
{
@@ -340,7 +340,7 @@ assert.throws(function() {
'Test Using Larger Than Block-Size Key and Larger Than One ' +
'Block-Size Data',
hmac: 'e8e99d0f45237d786d6bbaa7965c7808bbff1a91'
- }
+ },
];
if (!common.hasFipsCrypto) {
diff --git a/test/parallel/test-crypto-cipher-decipher.js b/test/parallel/test-crypto-cipher-decipher.js
index 603d90ff67941c..35514afbea9256 100644
--- a/test/parallel/test-crypto-cipher-decipher.js
+++ b/test/parallel/test-crypto-cipher-decipher.js
@@ -12,10 +12,10 @@ const assert = require('assert');
common.expectWarning({
Warning: [
- ['Use Cipheriv for counter mode of aes-256-gcm']
+ ['Use Cipheriv for counter mode of aes-256-gcm'],
],
DeprecationWarning: [
- ['crypto.createCipher is deprecated.', 'DEP0106']
+ ['crypto.createCipher is deprecated.', 'DEP0106'],
]
});
diff --git a/test/parallel/test-crypto-dh.js b/test/parallel/test-crypto-dh.js
index 92687b448c4ea1..25a1d0f765d426 100644
--- a/test/parallel/test-crypto-dh.js
+++ b/test/parallel/test-crypto-dh.js
@@ -111,7 +111,7 @@ for (const g of [Buffer.from([]),
[0x1, 0x2],
() => { },
/abc/,
- {}
+ {},
].forEach((input) => {
assert.throws(
() => crypto.createDiffieHellman(input),
@@ -217,7 +217,7 @@ const modp2buf = Buffer.from([
0x5c, 0xb6, 0xf4, 0x06, 0xb7, 0xed, 0xee, 0x38, 0x6b, 0xfb,
0x5a, 0x89, 0x9f, 0xa5, 0xae, 0x9f, 0x24, 0x11, 0x7c, 0x4b,
0x1f, 0xe6, 0x49, 0x28, 0x66, 0x51, 0xec, 0xe6, 0x53, 0x81,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
]);
{
diff --git a/test/parallel/test-crypto-hmac.js b/test/parallel/test-crypto-hmac.js
index 2f60d8124f03f6..cfaa041c0622d9 100644
--- a/test/parallel/test-crypto-hmac.js
+++ b/test/parallel/test-crypto-hmac.js
@@ -49,7 +49,7 @@ function testHmac(algo, key, data, expected) {
// If the key is a Buffer, test Hmac with a key object as well.
const keyWrappers = [
(key) => key,
- ...(typeof key === 'string' ? [] : [crypto.createSecretKey])
+ ...(typeof key === 'string' ? [] : [crypto.createSecretKey]),
];
for (const keyWrapper of keyWrappers) {
@@ -260,7 +260,7 @@ const rfc4231 = [
'20cdc944b6022cac3c4982b10d5eeb55c3e4de15134676fb6de04460' +
'65c97440fa8c6a58'
}
- }
+ },
];
for (let i = 0, l = rfc4231.length; i < l; i++) {
@@ -342,7 +342,7 @@ const rfc2202_md5 = [
'Test Using Larger Than Block-Size Key and Larger Than One ' +
'Block-Size Data',
hmac: '6f630fad67cda0ee1fb1f562db3aa53e'
- }
+ },
];
for (const { key, data, hmac } of rfc2202_md5)
@@ -400,7 +400,7 @@ const rfc2202_sha1 = [
'Test Using Larger Than Block-Size Key and Larger Than One ' +
'Block-Size Data',
hmac: 'e8e99d0f45237d786d6bbaa7965c7808bbff1a91'
- }
+ },
];
for (const { key, data, hmac } of rfc2202_sha1)
diff --git a/test/parallel/test-crypto-key-objects.js b/test/parallel/test-crypto-key-objects.js
index 871d5da66c2bd3..d7b3f9af83acd9 100644
--- a/test/parallel/test-crypto-key-objects.js
+++ b/test/parallel/test-crypto-key-objects.js
@@ -81,12 +81,12 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem',
const cipher = createCipheriv('aes-256-ecb', key, null);
const ciphertext = Buffer.concat([
- cipher.update(plaintext), cipher.final()
+ cipher.update(plaintext), cipher.final(),
]);
const decipher = createDecipheriv('aes-256-ecb', key, null);
const deciphered = Buffer.concat([
- decipher.update(ciphertext), decipher.final()
+ decipher.update(ciphertext), decipher.final(),
]);
assert(plaintext.equals(deciphered));
@@ -263,16 +263,16 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem',
// Test distinguishing PKCS#1 public and private keys based on the
// DER-encoded data only.
publicEncrypt({ format: 'der', type: 'pkcs1', key: publicDER }, plaintext),
- publicEncrypt({ format: 'der', type: 'pkcs1', key: privateDER }, plaintext)
+ publicEncrypt({ format: 'der', type: 'pkcs1', key: privateDER }, plaintext),
], [
privateKey,
{ format: 'pem', key: privatePem },
{ format: 'der', type: 'pkcs1', key: privateDER },
- { key: jwk, format: 'jwk' }
+ { key: jwk, format: 'jwk' },
]);
testDecryption(publicDecrypt, [
- privateEncrypt(privateKey, plaintext)
+ privateEncrypt(privateKey, plaintext),
], [
// Decrypt using the public key.
publicKey,
@@ -284,7 +284,7 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem',
privateKey,
{ format: 'pem', key: privatePem },
{ format: 'der', type: 'pkcs1', key: privateDER },
- { key: jwk, format: 'jwk' }
+ { key: jwk, format: 'jwk' },
]);
}
diff --git a/test/parallel/test-crypto-keygen.js b/test/parallel/test-crypto-keygen.js
index e5c8a107ba58a1..55f878971b90cc 100644
--- a/test/parallel/test-crypto-keygen.js
+++ b/test/parallel/test-crypto-keygen.js
@@ -1091,7 +1091,7 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher);
['group', 'prime'],
['group', 'primeLength'],
['group', 'generator'],
- ['prime', 'primeLength']
+ ['prime', 'primeLength'],
];
for (const [opt1, opt2] of incompatible) {
assert.throws(() => {
diff --git a/test/parallel/test-crypto-random.js b/test/parallel/test-crypto-random.js
index 9472f8ef07dde0..4f0c7dbb43f634 100644
--- a/test/parallel/test-crypto-random.js
+++ b/test/parallel/test-crypto-random.js
@@ -93,7 +93,7 @@ common.expectWarning('DeprecationWarning',
new Uint32Array(10),
new Float32Array(10),
new Float64Array(10),
- new DataView(new ArrayBuffer(10))
+ new DataView(new ArrayBuffer(10)),
].forEach((buf) => {
const before = Buffer.from(buf.buffer).toString('hex');
crypto.randomFillSync(buf);
@@ -117,7 +117,7 @@ common.expectWarning('DeprecationWarning',
{
[
new ArrayBuffer(10),
- new SharedArrayBuffer(10)
+ new SharedArrayBuffer(10),
].forEach((buf) => {
const before = Buffer.from(buf).toString('hex');
crypto.randomFillSync(buf);
@@ -150,7 +150,7 @@ common.expectWarning('DeprecationWarning',
new Uint32Array(10),
new Float32Array(10),
new Float64Array(10),
- new DataView(new ArrayBuffer(10))
+ new DataView(new ArrayBuffer(10)),
].forEach((buf) => {
const before = Buffer.from(buf.buffer).toString('hex');
crypto.randomFill(buf, common.mustSucceed((buf) => {
@@ -163,7 +163,7 @@ common.expectWarning('DeprecationWarning',
{
[
new ArrayBuffer(10),
- new SharedArrayBuffer(10)
+ new SharedArrayBuffer(10),
].forEach((buf) => {
const before = Buffer.from(buf).toString('hex');
crypto.randomFill(buf, common.mustSucceed((buf) => {
@@ -223,7 +223,7 @@ common.expectWarning('DeprecationWarning',
{
[
Buffer.alloc(10),
- new Uint8Array(new Array(10).fill(0))
+ new Uint8Array(new Array(10).fill(0)),
].forEach((buf) => {
const len = Buffer.byteLength(buf);
assert.strictEqual(len, 10, `Expected byteLength of 10, got ${len}`);
diff --git a/test/parallel/test-crypto-randomuuid.js b/test/parallel/test-crypto-randomuuid.js
index 232dcec62c8f2e..23e97fb8cf49a1 100644
--- a/test/parallel/test-crypto-randomuuid.js
+++ b/test/parallel/test-crypto-randomuuid.js
@@ -11,7 +11,7 @@ const {
} = require('crypto');
const last = new Set([
- '00000000-0000-0000-0000-000000000000'
+ '00000000-0000-0000-0000-000000000000',
]);
function testMatch(uuid) {
diff --git a/test/parallel/test-crypto-scrypt.js b/test/parallel/test-crypto-scrypt.js
index aec86d64891518..9db69646bbfb0a 100644
--- a/test/parallel/test-crypto-scrypt.js
+++ b/test/parallel/test-crypto-scrypt.js
@@ -99,7 +99,7 @@ const bad = [
{ N: 3, p: 1, r: 1 }, // Not power of 2.
{ N: 1, cost: 1 }, // Both N and cost
{ p: 1, parallelization: 1 }, // Both p and parallelization
- { r: 1, blockSize: 1 } // Both r and blocksize
+ { r: 1, blockSize: 1 }, // Both r and blocksize
];
// Test vectors where 128*N*r exceeds maxmem.
@@ -259,6 +259,6 @@ for (const { args, expected } of badargs) {
[
['N', 16384], ['cost', 16384],
['r', 8], ['blockSize', 8],
- ['p', 1], ['parallelization', 1]
+ ['p', 1], ['parallelization', 1],
].forEach((arg) => testParameter(...arg));
}
diff --git a/test/parallel/test-crypto-sign-verify.js b/test/parallel/test-crypto-sign-verify.js
index dc90e5b311bdf3..55d3de27ad478b 100644
--- a/test/parallel/test-crypto-sign-verify.js
+++ b/test/parallel/test-crypto-sign-verify.js
@@ -174,14 +174,14 @@ assert.throws(
getEffectiveSaltLength(crypto.constants.RSA_PSS_SALTLEN_DIGEST),
crypto.constants.RSA_PSS_SALTLEN_MAX_SIGN,
getEffectiveSaltLength(crypto.constants.RSA_PSS_SALTLEN_MAX_SIGN),
- 0, 16, 32, 64, 128
+ 0, 16, 32, 64, 128,
];
const verifySaltLengths = [
crypto.constants.RSA_PSS_SALTLEN_DIGEST,
getEffectiveSaltLength(crypto.constants.RSA_PSS_SALTLEN_DIGEST),
getEffectiveSaltLength(crypto.constants.RSA_PSS_SALTLEN_MAX_SIGN),
- 0, 16, 32, 64, 128
+ 0, 16, 32, 64, 128,
];
const errMessage = /^Error:.*data too large for key size$/;
@@ -390,7 +390,7 @@ assert.throws(
});
[
- Uint8Array, Uint16Array, Uint32Array, Float32Array, Float64Array
+ Uint8Array, Uint16Array, Uint32Array, Float32Array, Float64Array,
].forEach((clazz) => {
// These should all just work
sign.update(new clazz());
@@ -429,7 +429,7 @@ assert.throws(
{ private: fixtures.readKey('rsa_private_2048.pem', 'ascii'),
public: fixtures.readKey('rsa_public_2048.pem', 'ascii'),
algo: 'sha1',
- sigLen: 256 }
+ sigLen: 256 },
].forEach((pair) => {
const algo = pair.algo;
@@ -465,7 +465,7 @@ assert.throws(
}
[
- Uint8Array, Uint16Array, Uint32Array, Float32Array, Float64Array
+ Uint8Array, Uint16Array, Uint32Array, Float32Array, Float64Array,
].forEach((clazz) => {
const data = new clazz();
const sig = crypto.sign(algo, data, pair.private);
@@ -503,7 +503,7 @@ assert.throws(
[
crypto.createSign('sha1').update(data).sign(privKey),
crypto.sign('sha1', data, privKey),
- crypto.sign('sha1', data, { key: privKey, dsaEncoding: 'der' })
+ crypto.sign('sha1', data, { key: privKey, dsaEncoding: 'der' }),
].forEach((sig) => {
// Signature length variability due to DER encoding
assert(sig.length >= length + 4 && sig.length <= length + 8);
diff --git a/test/parallel/test-crypto-x509.js b/test/parallel/test-crypto-x509.js
index 0915cb61fd4226..c85a79b4854369 100644
--- a/test/parallel/test-crypto-x509.js
+++ b/test/parallel/test-crypto-x509.js
@@ -149,7 +149,7 @@ const der = Buffer.from(
'wildcards',
'partialWildcards',
'multiLabelWildcards',
- 'singleLabelSubdomains'
+ 'singleLabelSubdomains',
].forEach((key) => {
[1, '', null, {}].forEach((i) => {
assert.throws(() => x509.checkHost('agent1', { [key]: i }), {
diff --git a/test/parallel/test-crypto.js b/test/parallel/test-crypto.js
index 623320fb1907f1..58441be4d093f0 100644
--- a/test/parallel/test-crypto.js
+++ b/test/parallel/test-crypto.js
@@ -27,7 +27,7 @@ if (!common.hasCrypto)
common.expectWarning({
DeprecationWarning: [
- ['crypto.createCipher is deprecated.', 'DEP0106']
+ ['crypto.createCipher is deprecated.', 'DEP0106'],
]
});
@@ -212,7 +212,7 @@ assert.throws(() => {
'eKN7LggbF3Dk5wIQN6SL+fQ5H/+7NgARsVBp0QIRANxYRukavs4QvuyNhMx+vrkCEQCbf6j/',
'Ig6/HueCK/0Jkmp+',
'-----END RSA PRIVATE KEY-----',
- ''
+ '',
].join('\n');
crypto.createSign('SHA256').update('test').sign(priv);
}, (err) => {
diff --git a/test/parallel/test-dgram-createSocket-type.js b/test/parallel/test-dgram-createSocket-type.js
index ae141d3c383236..19bbd6c1b2b088 100644
--- a/test/parallel/test-dgram-createSocket-type.js
+++ b/test/parallel/test-dgram-createSocket-type.js
@@ -11,13 +11,13 @@ const invalidTypes = [
true,
false,
null,
- undefined
+ undefined,
];
const validTypes = [
'udp4',
'udp6',
{ type: 'udp4' },
- { type: 'udp6' }
+ { type: 'udp6' },
];
const errMessage = /^Bad socket type specified\. Valid types are: udp4, udp6$/;
diff --git a/test/parallel/test-dgram-deprecation-error.js b/test/parallel/test-dgram-deprecation-error.js
index 37664a5720c96f..c544a917b02b83 100644
--- a/test/parallel/test-dgram-deprecation-error.js
+++ b/test/parallel/test-dgram-deprecation-error.js
@@ -14,12 +14,12 @@ const propertiesToTest = [
'_receiving',
'_bindState',
'_queue',
- '_reuseAddr'
+ '_reuseAddr',
];
const methodsToTest = [
'_healthCheck',
- '_stopReceiving'
+ '_stopReceiving',
];
const propertyCases = propertiesToTest.map((propName) => {
@@ -41,7 +41,7 @@ const propertyCases = propertiesToTest.map((propName) => {
'DEP0112'
);
sock[propName] = null;
- }
+ },
];
});
diff --git a/test/parallel/test-dns-lookup-promises.js b/test/parallel/test-dns-lookup-promises.js
index 9dab377f6ac4eb..31c7dbd2458fe6 100644
--- a/test/parallel/test-dns-lookup-promises.js
+++ b/test/parallel/test-dns-lookup-promises.js
@@ -56,7 +56,7 @@ async function lookupPositive() {
stub: getaddrinfoPositive(['some-address2']),
factory: () => dnsPromises.lookup('example.com', { family: 6 }),
expectation: { address: 'some-address2', family: 6 }
- }
+ },
].forEach(async ({ stub, factory, expectation }) => {
getaddrinfoStub = stub;
assert.deepStrictEqual(await factory(), expectation);
@@ -80,7 +80,7 @@ async function lookupallPositive() {
factory: () => dnsPromises.lookup('example', { all: true }),
expectation: [
{ address: '::1', family: 6 },
- { address: '::2', family: 6 }
+ { address: '::2', family: 6 },
]
},
{
@@ -88,7 +88,7 @@ async function lookupallPositive() {
factory: () => dnsPromises.lookup('example', { all: true, family: 4 }),
expectation: [
{ address: '::1', family: 4 },
- { address: '::2', family: 4 }
+ { address: '::2', family: 4 },
]
},
{
@@ -96,7 +96,7 @@ async function lookupallPositive() {
factory: () => dnsPromises.lookup('example', { all: true }),
expectation: [
{ address: '127.0.0.1', family: 4 },
- { address: 'some-address', family: 0 }
+ { address: 'some-address', family: 0 },
]
},
{
@@ -104,14 +104,14 @@ async function lookupallPositive() {
factory: () => dnsPromises.lookup('example', { all: true, family: 6 }),
expectation: [
{ address: '127.0.0.1', family: 6 },
- { address: 'some-address', family: 6 }
+ { address: 'some-address', family: 6 },
]
},
{
stub: getaddrinfoPositive([]),
factory: () => dnsPromises.lookup('example', { all: true }),
expectation: []
- }
+ },
].forEach(async ({ stub, factory, expectation }) => {
getaddrinfoStub = stub;
assert.deepStrictEqual(await factory(), expectation);
@@ -134,6 +134,6 @@ async function lookupallNegative() {
lookupPositive(),
lookupNegative(),
lookupallPositive(),
- lookupallNegative()
+ lookupallNegative(),
]);
})().then(common.mustCall());
diff --git a/test/parallel/test-dns-lookup.js b/test/parallel/test-dns-lookup.js
index 606c1c10e68e53..14dfec61ee08f6 100644
--- a/test/parallel/test-dns-lookup.js
+++ b/test/parallel/test-dns-lookup.js
@@ -27,7 +27,7 @@ const dnsPromises = dns.promises;
common.expectWarning({
// For 'internal/test/binding' module.
'internal/test/binding': [
- 'These APIs are for internal testing only. Do not use them.'
+ 'These APIs are for internal testing only. Do not use them.',
],
// For calling `dns.lookup` with falsy `hostname`.
'DeprecationWarning': {
diff --git a/test/parallel/test-dns-multi-channel.js b/test/parallel/test-dns-multi-channel.js
index 890c10c9862741..026ef44e339e85 100644
--- a/test/parallel/test-dns-multi-channel.js
+++ b/test/parallel/test-dns-multi-channel.js
@@ -13,7 +13,7 @@ const servers = [
{
socket: dgram.createSocket('udp4'),
reply: { type: 'A', address: '5.6.7.8', ttl: 123, domain: 'example.org' }
- }
+ },
];
let waiting = servers.length;
diff --git a/test/parallel/test-dns-resolveany.js b/test/parallel/test-dns-resolveany.js
index 7cc4a046ba7e2c..0bbfe8f9f18432 100644
--- a/test/parallel/test-dns-resolveany.js
+++ b/test/parallel/test-dns-resolveany.js
@@ -27,7 +27,7 @@ const answers = [
type: 'CAA',
critical: 128,
issue: 'platynum.ch'
- }
+ },
];
const server = dgram.createSocket('udp4');
diff --git a/test/parallel/test-dns-setservers-type-check.js b/test/parallel/test-dns-setservers-type-check.js
index a6add9518f5080..007cae4f95d681 100644
--- a/test/parallel/test-dns-setservers-type-check.js
+++ b/test/parallel/test-dns-setservers-type-check.js
@@ -15,7 +15,7 @@ const promiseResolver = new dns.promises.Resolver();
addresses.DNS4_SERVER,
{
address: addresses.DNS4_SERVER
- }
+ },
].forEach((val) => {
const errObj = {
code: 'ERR_INVALID_ARG_TYPE',
@@ -54,8 +54,8 @@ const promiseResolver = new dns.promises.Resolver();
[
{
address: addresses.DNS4_SERVER
- }
- ]
+ },
+ ],
].forEach((val) => {
const errObj = {
code: 'ERR_INVALID_ARG_TYPE',
@@ -104,8 +104,8 @@ const promiseResolver = new dns.promises.Resolver();
[
{
address: addresses.DNS4_SERVER
- }
- ]
+ },
+ ],
].forEach((val) => {
const errObj = {
code: 'ERR_INVALID_ARG_TYPE',
diff --git a/test/parallel/test-dns.js b/test/parallel/test-dns.js
index 6556f6c1a5abd2..a6e17c26531aca 100644
--- a/test/parallel/test-dns.js
+++ b/test/parallel/test-dns.js
@@ -61,7 +61,7 @@ assert(existing.length > 0);
assert.deepStrictEqual(dns.getServers(), [
'127.0.0.1',
'192.168.1.1',
- '0.0.0.0'
+ '0.0.0.0',
]);
}
@@ -75,7 +75,7 @@ assert(existing.length > 0);
// Check for REDOS issues.
':'.repeat(100000),
'['.repeat(100000),
- '['.repeat(100000) + ']'.repeat(100000) + 'a'
+ '['.repeat(100000) + ']'.repeat(100000) + 'a',
];
invalidServers.forEach((serv) => {
assert.throws(
@@ -383,7 +383,7 @@ assert.throws(() => {
retry: 900,
expire: 1800,
minttl: 3333333333
- }
+ },
] },
];
diff --git a/test/parallel/test-domain-abort-on-uncaught.js b/test/parallel/test-domain-abort-on-uncaught.js
index e74fb436bf18e0..08551721c1d39b 100644
--- a/test/parallel/test-domain-abort-on-uncaught.js
+++ b/test/parallel/test-domain-abort-on-uncaught.js
@@ -191,7 +191,7 @@ const tests = [
});
});
});
- }
+ },
];
if (process.argv[2] === 'child') {
diff --git a/test/parallel/test-domain-error-types.js b/test/parallel/test-domain-error-types.js
index b7c2d6ba9b748e..cfd4fa801e3d95 100644
--- a/test/parallel/test-domain-error-types.js
+++ b/test/parallel/test-domain-error-types.js
@@ -11,7 +11,7 @@ const domain = require('domain');
// https://github.com/nodejs/node/issues/28275 is fixed in debug mode.
for (const something of [
- 42, null, undefined, false, () => {}, 'string', Symbol('foo')
+ 42, null, undefined, false, () => {}, 'string', Symbol('foo'),
]) {
const d = new domain.Domain();
d.run(common.mustCall(() => {
diff --git a/test/parallel/test-domain-multiple-errors.js b/test/parallel/test-domain-multiple-errors.js
index 5b031eb1b44bc4..fc4ccc47d32708 100644
--- a/test/parallel/test-domain-multiple-errors.js
+++ b/test/parallel/test-domain-multiple-errors.js
@@ -10,7 +10,7 @@ const domain = require('domain');
const d = new domain.Domain();
const values = [
- 42, null, undefined, false, () => {}, 'string', Symbol('foo')
+ 42, null, undefined, false, () => {}, 'string', Symbol('foo'),
];
d.on('error', common.mustCall((err) => {
diff --git a/test/parallel/test-env-newprotomethod-remove-unnecessary-prototypes.js b/test/parallel/test-env-newprotomethod-remove-unnecessary-prototypes.js
index a2e2dabab0ffb2..deb7993a145825 100644
--- a/test/parallel/test-env-newprotomethod-remove-unnecessary-prototypes.js
+++ b/test/parallel/test-env-newprotomethod-remove-unnecessary-prototypes.js
@@ -13,7 +13,7 @@ const { internalBinding } = require('internal/test/binding');
internalBinding('udp_wrap').UDP.prototype.send6,
internalBinding('tcp_wrap').TCP.prototype.bind,
internalBinding('udp_wrap').UDP.prototype.close,
- internalBinding('tcp_wrap').TCP.prototype.open
+ internalBinding('tcp_wrap').TCP.prototype.open,
].forEach((binding, i) => {
assert.strictEqual('prototype' in binding, false, `Test ${i} failed`);
});
diff --git a/test/parallel/test-err-name-deprecation.js b/test/parallel/test-err-name-deprecation.js
index 58dff38364c818..5f3fb28f100663 100644
--- a/test/parallel/test-err-name-deprecation.js
+++ b/test/parallel/test-err-name-deprecation.js
@@ -9,7 +9,7 @@ common.expectWarning({
'DEP0111'],
['Directly calling process.binding(\'uv\').errname() is being ' +
'deprecated. Please make sure to use util.getSystemErrorName() instead.',
- 'DEP0119']
+ 'DEP0119'],
]
});
diff --git a/test/parallel/test-eslint-alphabetize-errors.js b/test/parallel/test-eslint-alphabetize-errors.js
index a9bc26d7f0540a..df822f27409520 100644
--- a/test/parallel/test-eslint-alphabetize-errors.js
+++ b/test/parallel/test-eslint-alphabetize-errors.js
@@ -14,7 +14,7 @@ new RuleTester().run('alphabetize-errors', rule, {
E('AAA', 'foo');
E('BBB', 'bar');
E('CCC', 'baz');
- `
+ `,
],
invalid: [
{
@@ -24,6 +24,6 @@ new RuleTester().run('alphabetize-errors', rule, {
E('CCC', 'baz');
`,
errors: [{ message: 'Out of ASCIIbetical order - BBB >= AAA', line: 3 }]
- }
+ },
]
});
diff --git a/test/parallel/test-eslint-crypto-check.js b/test/parallel/test-eslint-crypto-check.js
index 0a973f4c9c951d..164149131a9758 100644
--- a/test/parallel/test-eslint-crypto-check.js
+++ b/test/parallel/test-eslint-crypto-check.js
@@ -27,7 +27,7 @@ new RuleTester().run('crypto-check', rule, {
common.skip("missing crypto");
}
internalBinding("crypto");
- `
+ `,
],
invalid: [
{
@@ -71,6 +71,6 @@ new RuleTester().run('crypto-check', rule, {
'}\n' +
'if (common.foo) {}\n' +
'internalBinding("crypto")'
- }
+ },
]
});
diff --git a/test/parallel/test-eslint-documented-errors.js b/test/parallel/test-eslint-documented-errors.js
index a047ecd35847e0..e8abd38a983e5b 100644
--- a/test/parallel/test-eslint-documented-errors.js
+++ b/test/parallel/test-eslint-documented-errors.js
@@ -14,7 +14,7 @@ new RuleTester().run('documented-errors', rule, {
valid: [
`
E('ERR_ASSERTION', 'foo');
- `
+ `,
],
invalid: [
{
@@ -30,8 +30,8 @@ new RuleTester().run('documented-errors', rule, {
message:
`doc/api/errors.md does not have an anchor for "${invalidCode}"`,
line: 2
- }
+ },
]
- }
+ },
]
});
diff --git a/test/parallel/test-eslint-eslint-check.js b/test/parallel/test-eslint-eslint-check.js
index c1ee3d501f0eec..28ec2e1f10fdb3 100644
--- a/test/parallel/test-eslint-eslint-check.js
+++ b/test/parallel/test-eslint-eslint-check.js
@@ -18,7 +18,7 @@ new RuleTester().run('eslint-check', rule, {
'foo;',
'require("common")\n' +
'common.skipIfEslintMissing();\n' +
- 'require("../../tools/node_modules/eslint")'
+ 'require("../../tools/node_modules/eslint")',
],
invalid: [
{
@@ -28,6 +28,6 @@ new RuleTester().run('eslint-check', rule, {
output: 'require("common")\n' +
'common.skipIfEslintMissing();\n' +
'require("../../tools/node_modules/eslint").RuleTester'
- }
+ },
]
});
diff --git a/test/parallel/test-eslint-inspector-check.js b/test/parallel/test-eslint-inspector-check.js
index cf9f60e94505b8..2d945c3da33188 100644
--- a/test/parallel/test-eslint-inspector-check.js
+++ b/test/parallel/test-eslint-inspector-check.js
@@ -17,7 +17,7 @@ new RuleTester().run('inspector-check', rule, {
'foo;',
'require("common")\n' +
'common.skipIfInspectorDisabled();\n' +
- 'require("inspector")'
+ 'require("inspector")',
],
invalid: [
{
@@ -27,6 +27,6 @@ new RuleTester().run('inspector-check', rule, {
output: 'require("common")\n' +
'common.skipIfInspectorDisabled();\n' +
'require("inspector")'
- }
+ },
]
});
diff --git a/test/parallel/test-eslint-no-unescaped-regexp-dot.js b/test/parallel/test-eslint-no-unescaped-regexp-dot.js
index 69600d80731302..7cf69877ca12ed 100644
--- a/test/parallel/test-eslint-no-unescaped-regexp-dot.js
+++ b/test/parallel/test-eslint-no-unescaped-regexp-dot.js
@@ -17,7 +17,7 @@ new RuleTester().run('no-unescaped-regexp-dot', rule, {
'/.*/',
'/.?/',
'/.{5}/',
- String.raw`/\\\./`
+ String.raw`/\\\./`,
],
invalid: [
{
@@ -27,6 +27,6 @@ new RuleTester().run('no-unescaped-regexp-dot', rule, {
{
code: String.raw`/\\./`,
errors: [{ message: 'Unescaped dot character in regular expression' }]
- }
+ },
]
});
diff --git a/test/parallel/test-eslint-prefer-assert-iferror.js b/test/parallel/test-eslint-prefer-assert-iferror.js
index 342459f0b77ce4..5ccb7883393f46 100644
--- a/test/parallel/test-eslint-prefer-assert-iferror.js
+++ b/test/parallel/test-eslint-prefer-assert-iferror.js
@@ -14,7 +14,7 @@ new RuleTester().run('prefer-assert-iferror', rule, {
'assert.ifError(err);',
'if (err) throw somethingElse;',
'throw err;',
- 'if (err) { throw somethingElse; }'
+ 'if (err) { throw somethingElse; }',
],
invalid: [
{
@@ -30,6 +30,6 @@ new RuleTester().run('prefer-assert-iferror', rule, {
errors: [{ message: 'Use assert.ifError(error) instead.' }],
output: 'require("assert");\n' +
'assert.ifError(error);'
- }
+ },
]
});
diff --git a/test/parallel/test-eslint-prefer-assert-methods.js b/test/parallel/test-eslint-prefer-assert-methods.js
index a5829cdce3054f..3271f6ab1856b0 100644
--- a/test/parallel/test-eslint-prefer-assert-methods.js
+++ b/test/parallel/test-eslint-prefer-assert-methods.js
@@ -21,7 +21,7 @@ new RuleTester().run('prefer-assert-methods', rule, {
'assert(foo != bar && baz);',
'assert.ok(foo);',
'assert.ok(foo != bar);',
- 'assert.ok(foo === bar && baz);'
+ 'assert.ok(foo === bar && baz);',
],
invalid: [
{
@@ -51,6 +51,6 @@ new RuleTester().run('prefer-assert-methods', rule, {
message: "'assert.notStrictEqual' should be used instead of '!=='"
}],
output: 'assert.notStrictEqual(foo, bar);'
- }
+ },
]
});
diff --git a/test/parallel/test-eslint-prefer-common-mustnotcall.js b/test/parallel/test-eslint-prefer-common-mustnotcall.js
index dba244a2a9fa89..5c360bb1ecbec6 100644
--- a/test/parallel/test-eslint-prefer-common-mustnotcall.js
+++ b/test/parallel/test-eslint-prefer-common-mustnotcall.js
@@ -16,7 +16,7 @@ new RuleTester().run('prefer-common-mustnotcall', rule, {
valid: [
'common.mustNotCall(fn)',
'common.mustCall(fn)',
- 'common.mustCall(fn, 1)'
+ 'common.mustCall(fn, 1)',
],
invalid: [
{
@@ -26,6 +26,6 @@ new RuleTester().run('prefer-common-mustnotcall', rule, {
{
code: 'common.mustCall(0)',
errors: [{ message }]
- }
+ },
]
});
diff --git a/test/parallel/test-eslint-prefer-common-mustsucceed.js b/test/parallel/test-eslint-prefer-common-mustsucceed.js
index fa16fa5f4c29e8..302b6a0bee4f38 100644
--- a/test/parallel/test-eslint-prefer-common-mustsucceed.js
+++ b/test/parallel/test-eslint-prefer-common-mustsucceed.js
@@ -21,7 +21,7 @@ new RuleTester({
'foo((err) => assert.ifError(err))',
'foo(function(err) { assert.ifError(err) })',
'foo(assert.ifError)',
- 'common.mustCall((err) => err)'
+ 'common.mustCall((err) => err)',
],
invalid: [
{
@@ -47,6 +47,6 @@ new RuleTester({
{
code: 'common.mustCall(function(e) {{ assert.ifError(e); }})',
errors: [{ message: msg2 }]
- }
+ },
]
});
diff --git a/test/parallel/test-eslint-prefer-util-format-errors.js b/test/parallel/test-eslint-prefer-util-format-errors.js
index 762fec28b1f1d8..a6c2662a382418 100644
--- a/test/parallel/test-eslint-prefer-util-format-errors.js
+++ b/test/parallel/test-eslint-prefer-util-format-errors.js
@@ -17,7 +17,7 @@ new RuleTester({ parserOptions: { ecmaVersion: 6 } })
'E(\'ABC\', \'abc\');',
'E(\'ABC\', (arg1, arg2) => `${arg2}${arg1}`);',
'E(\'ABC\', (arg1, arg2) => `${arg1}{arg2.something}`);',
- 'E(\'ABC\', (arg1, arg2) => fn(arg1, arg2));'
+ 'E(\'ABC\', (arg1, arg2) => fn(arg1, arg2));',
],
invalid: [
{
@@ -26,6 +26,6 @@ new RuleTester({ parserOptions: { ecmaVersion: 6 } })
message: 'Please use a printf-like formatted string that ' +
'util.format can consume.'
}]
- }
+ },
]
});
diff --git a/test/parallel/test-eslint-require-common-first.js b/test/parallel/test-eslint-require-common-first.js
index 018d4185d527e5..b3d132e11fdc3f 100644
--- a/test/parallel/test-eslint-require-common-first.js
+++ b/test/parallel/test-eslint-require-common-first.js
@@ -14,7 +14,7 @@ new RuleTester().run('require-common-first', rule, {
{
code: 'require("common")\n' +
'require("assert")'
- }
+ },
],
invalid: [
{
@@ -22,6 +22,6 @@ new RuleTester().run('require-common-first', rule, {
'require("common")',
errors: [{ message: 'Mandatory module "common" must be loaded ' +
'before any other modules.' }]
- }
+ },
]
});
diff --git a/test/parallel/test-eslint-required-modules.js b/test/parallel/test-eslint-required-modules.js
index e81a7d4b241353..c891e2350711a4 100644
--- a/test/parallel/test-eslint-required-modules.js
+++ b/test/parallel/test-eslint-required-modules.js
@@ -46,6 +46,6 @@ new RuleTester().run('required-modules', rule, {
code: 'require("somethingElse")',
options: [{ common: 'common' }],
errors: [{ message: 'Mandatory module "common" must be loaded.' }]
- }
+ },
]
});
diff --git a/test/parallel/test-eval-strict-referenceerror.js b/test/parallel/test-eval-strict-referenceerror.js
index a96478a1bedaae..97f2b15ba0ed3d 100644
--- a/test/parallel/test-eval-strict-referenceerror.js
+++ b/test/parallel/test-eval-strict-referenceerror.js
@@ -15,7 +15,7 @@ function test() {
'function bar() {',
'\'use strict\';',
'return foo; // foo isn\'t captured in 0.10',
- '};'
+ '};',
].join('\n');
eval(code);
diff --git a/test/parallel/test-event-emitter-special-event-names.js b/test/parallel/test-event-emitter-special-event-names.js
index 7ff781f0f90c5a..f34faba9468cc2 100644
--- a/test/parallel/test-event-emitter-special-event-names.js
+++ b/test/parallel/test-event-emitter-special-event-names.js
@@ -19,7 +19,7 @@ ee.on('toString', handler);
assert.deepStrictEqual(ee.eventNames(), [
'__proto__',
'__defineGetter__',
- 'toString'
+ 'toString',
]);
assert.deepStrictEqual(ee.listeners('__proto__'), [handler]);
diff --git a/test/parallel/test-event-on-async-iterator.js b/test/parallel/test-event-on-async-iterator.js
index 9ad319136fa493..192326e12bcc39 100644
--- a/test/parallel/test-event-on-async-iterator.js
+++ b/test/parallel/test-event-on-async-iterator.js
@@ -119,7 +119,7 @@ async function next() {
const results = await Promise.all([
iterable.next(),
iterable.next(),
- iterable.next()
+ iterable.next(),
]);
assert.deepStrictEqual(results, [{
@@ -149,7 +149,7 @@ async function nextError() {
const results = await Promise.allSettled([
iterable.next(),
iterable.next(),
- iterable.next()
+ iterable.next(),
]);
assert.deepStrictEqual(results, [{
status: 'rejected',
@@ -373,7 +373,7 @@ async function run() {
eventTargetAbortableOnBefore,
eventTargetAbortableOnAfter,
eventTargetAbortableOnAfter2,
- abortableOnAfterDone
+ abortableOnAfterDone,
];
for (const fn of funcs) {
diff --git a/test/parallel/test-eventtarget.js b/test/parallel/test-eventtarget.js
index 124fa174e921bd..a85e2cd7f1b9f9 100644
--- a/test/parallel/test-eventtarget.js
+++ b/test/parallel/test-eventtarget.js
@@ -233,7 +233,7 @@ let asyncTest = Promise.resolve();
{}, // No type event
undefined,
1,
- false
+ false,
].forEach((i) => {
throws(() => target.dispatchEvent(i), {
code: 'ERR_INVALID_ARG_TYPE',
@@ -254,7 +254,7 @@ let asyncTest = Promise.resolve();
'foo',
1,
{}, // No handleEvent function
- false
+ false,
].forEach((i) => throws(() => target.addEventListener('foo', i), err(i)));
}
@@ -398,7 +398,7 @@ let asyncTest = Promise.resolve();
undefined,
false,
Symbol(),
- /a/
+ /a/,
].forEach((i) => {
throws(() => target.dispatchEvent.call(i, event), {
code: 'ERR_INVALID_THIS'
diff --git a/test/parallel/test-fs-access.js b/test/parallel/test-fs-access.js
index cd4ac90d8fc2a8..9fa4dfcf1fe4d8 100644
--- a/test/parallel/test-fs-access.js
+++ b/test/parallel/test-fs-access.js
@@ -162,7 +162,7 @@ fs.accessSync(readWriteFile, mode);
1n,
{ [Symbol.toPrimitive]() { return fs.R_OK; } },
[1],
- 'r'
+ 'r',
].forEach((mode, i) => {
console.log(mode, i);
assert.throws(
@@ -186,7 +186,7 @@ fs.accessSync(readWriteFile, mode);
-1,
8,
Infinity,
- NaN
+ NaN,
].forEach((mode, i) => {
console.log(mode, i);
assert.throws(
diff --git a/test/parallel/test-fs-append-file-sync.js b/test/parallel/test-fs-append-file-sync.js
index 9914863674b0b2..0070b8f6486d75 100644
--- a/test/parallel/test-fs-append-file-sync.js
+++ b/test/parallel/test-fs-append-file-sync.js
@@ -74,7 +74,7 @@ const filename4 = join(tmpdir.path, 'append-sync4.txt');
fs.writeFileSync(filename4, currentFileData, { mode: m });
[
- true, false, 0, 1, Infinity, () => {}, {}, [], undefined, null
+ true, false, 0, 1, Infinity, () => {}, {}, [], undefined, null,
].forEach((value) => {
assert.throws(
() => fs.appendFileSync(filename4, value, { mode: m }),
diff --git a/test/parallel/test-fs-buffertype-writesync.js b/test/parallel/test-fs-buffertype-writesync.js
index fca5b944970836..5649a00569a2fa 100644
--- a/test/parallel/test-fs-buffertype-writesync.js
+++ b/test/parallel/test-fs-buffertype-writesync.js
@@ -7,7 +7,7 @@ const assert = require('assert');
const fs = require('fs');
[
- true, false, 0, 1, Infinity, () => {}, {}, [], undefined, null
+ true, false, 0, 1, Infinity, () => {}, {}, [], undefined, null,
].forEach((value) => {
assert.throws(
() => fs.writeSync(1, value),
diff --git a/test/parallel/test-fs-filehandle.js b/test/parallel/test-fs-filehandle.js
index bed9ebfa9c86c1..818a3824904431 100644
--- a/test/parallel/test-fs-filehandle.js
+++ b/test/parallel/test-fs-filehandle.js
@@ -27,10 +27,10 @@ const deprecationWarning =
common.expectWarning({
'internal/test/binding': [
- 'These APIs are for internal testing only. Do not use them.'
+ 'These APIs are for internal testing only. Do not use them.',
],
'Warning': [
- `Closing file descriptor ${fdnum} on garbage collection`
+ `Closing file descriptor ${fdnum} on garbage collection`,
],
'DeprecationWarning': [[deprecationWarning, 'DEP0137']]
});
diff --git a/test/parallel/test-fs-promises-file-handle-write.js b/test/parallel/test-fs-promises-file-handle-write.js
index dcff311b3d3a33..3c25842d8bf9cc 100644
--- a/test/parallel/test-fs-promises-file-handle-write.js
+++ b/test/parallel/test-fs-promises-file-handle-write.js
@@ -68,5 +68,5 @@ Promise.all([
validateWrite(),
validateEmptyWrite(),
validateNonUint8ArrayWrite(),
- validateNonStringValuesWrite()
+ validateNonStringValuesWrite(),
]).then(common.mustCall());
diff --git a/test/parallel/test-fs-promises-watch.js b/test/parallel/test-fs-promises-watch.js
index 4603b934c4b8e4..c8c2d9250bad03 100644
--- a/test/parallel/test-fs-promises-watch.js
+++ b/test/parallel/test-fs-promises-watch.js
@@ -35,7 +35,7 @@ const kCases = [
'watch2',
'bar',
'dirPath'
- )
+ ),
];
tmpdir.refresh();
diff --git a/test/parallel/test-fs-promises.js b/test/parallel/test-fs-promises.js
index e01fc2ec6ad1e7..b70327984851f3 100644
--- a/test/parallel/test-fs-promises.js
+++ b/test/parallel/test-fs-promises.js
@@ -283,7 +283,7 @@ async function getHandle(dest) {
name: 'Error',
message: 'The lchmod() method is not implemented'
})
- )
+ ),
]);
}
diff --git a/test/parallel/test-fs-read-stream-throw-type-error.js b/test/parallel/test-fs-read-stream-throw-type-error.js
index 83b9387cc38da9..a01d23d5abdd10 100644
--- a/test/parallel/test-fs-read-stream-throw-type-error.js
+++ b/test/parallel/test-fs-read-stream-throw-type-error.js
@@ -43,7 +43,7 @@ const rangeError = {
[
{ start: 'invalid' },
{ end: 'invalid' },
- { start: 'invalid', end: 'invalid' }
+ { start: 'invalid', end: 'invalid' },
].forEach((opts) => createReadStreamErr(example, opts, typeError));
// Case 2: Should throw RangeError if either start or end is NaN
@@ -71,7 +71,7 @@ createReadStreamErr(example, { start: 5, end: 1 }, rangeError);
const NOT_SAFE_INTEGER = 2 ** 53;
[
{ start: NOT_SAFE_INTEGER, end: Infinity },
- { start: 0, end: NOT_SAFE_INTEGER }
+ { start: 0, end: NOT_SAFE_INTEGER },
].forEach((opts) =>
createReadStreamErr(example, opts, rangeError)
);
diff --git a/test/parallel/test-fs-realpath-pipe.js b/test/parallel/test-fs-realpath-pipe.js
index a2e88cce422e07..29fe1d3b7d28e1 100644
--- a/test/parallel/test-fs-realpath-pipe.js
+++ b/test/parallel/test-fs-realpath-pipe.js
@@ -26,7 +26,7 @@ for (const code of [
} catch (e) {
console.error(e);
process.exit(1);
- }`
+ }`,
]) {
const child = spawnSync(process.execPath, ['-e', code], {
stdio: 'pipe'
diff --git a/test/parallel/test-fs-realpath.js b/test/parallel/test-fs-realpath.js
index 04d746243bf8c5..488e4b4ceaada3 100644
--- a/test/parallel/test-fs-realpath.js
+++ b/test/parallel/test-fs-realpath.js
@@ -106,7 +106,7 @@ function test_simple_relative_symlink(realpath, realpathSync, callback) {
const entry = `${tmpDir}/symlink`;
const expected = `${tmpDir}/cycles/root.js`;
[
- [entry, `../${path.basename(tmpDir)}/cycles/root.js`]
+ [entry, `../${path.basename(tmpDir)}/cycles/root.js`],
].forEach(function(t) {
try { fs.unlinkSync(t[0]); } catch {}
console.log('fs.symlinkSync(%j, %j, %j)', t[1], t[0], 'file');
@@ -132,7 +132,7 @@ function test_simple_absolute_symlink(realpath, realpathSync, callback) {
const entry = `${tmpAbsDir}/symlink`;
const expected = fixtures.path('nested-index', 'one');
[
- [entry, expected]
+ [entry, expected],
].forEach(function(t) {
try { fs.unlinkSync(t[0]); } catch {}
console.error('fs.symlinkSync(%j, %j, %j)', t[1], t[0], type);
@@ -214,7 +214,7 @@ function test_cyclic_link_protection(realpath, realpathSync, callback) {
[
[entry, '../cycles/realpath-3b'],
[path.join(tmpDir, '/cycles/realpath-3b'), '../cycles/realpath-3c'],
- [path.join(tmpDir, '/cycles/realpath-3c'), '../cycles/realpath-3a']
+ [path.join(tmpDir, '/cycles/realpath-3c'), '../cycles/realpath-3a'],
].forEach(function(t) {
try { fs.unlinkSync(t[0]); } catch {}
fs.symlinkSync(t[1], t[0], 'dir');
@@ -267,7 +267,7 @@ function test_relative_input_cwd(realpath, realpathSync, callback) {
[
[entry, '../cycles/realpath-3b'],
[`${tmpDir}/cycles/realpath-3b`, '../cycles/realpath-3c'],
- [`${tmpDir}/cycles/realpath-3c`, 'root.js']
+ [`${tmpDir}/cycles/realpath-3c`, 'root.js'],
].forEach(function(t) {
const fn = t[0];
console.error('fn=%j', fn);
@@ -323,7 +323,7 @@ function test_deep_symlink_mix(realpath, realpathSync, callback) {
[`${targetsAbsDir}/nested-index/one/realpath-c`,
`${targetsAbsDir}/nested-index/two/realpath-c`],
[`${targetsAbsDir}/nested-index/two/realpath-c`,
- `${tmpDir}/cycles/root.js`]
+ `${tmpDir}/cycles/root.js`],
].forEach(function(t) {
try { fs.unlinkSync(t[0]); } catch {}
fs.symlinkSync(t[1], t[0]);
@@ -477,14 +477,14 @@ function test_abs_with_kids(realpath, realpathSync, cb) {
const root = `${tmpAbsDir}/node-test-realpath-abs-kids`;
function cleanup() {
['/a/b/c/x.txt',
- '/a/link'
+ '/a/link',
].forEach(function(file) {
try { fs.unlinkSync(root + file); } catch {}
});
['/a/b/c',
'/a/b',
'/a',
- ''
+ '',
].forEach(function(folder) {
try { fs.rmdirSync(root + folder); } catch {}
});
@@ -495,7 +495,7 @@ function test_abs_with_kids(realpath, realpathSync, cb) {
['',
'/a',
'/a/b',
- '/a/b/c'
+ '/a/b/c',
].forEach(function(folder) {
console.log(`mkdir ${root}${folder}`);
fs.mkdirSync(root + folder, 0o700);
@@ -553,7 +553,7 @@ const tests = [
test_up_multiple,
test_up_multiple_with_null_options,
test_root,
- test_root_with_null_options
+ test_root_with_null_options,
];
const numtests = tests.length;
let testsRun = 0;
diff --git a/test/parallel/test-fs-symlink-dir.js b/test/parallel/test-fs-symlink-dir.js
index 2f88ceb41621d8..012d34c301e835 100644
--- a/test/parallel/test-fs-symlink-dir.js
+++ b/test/parallel/test-fs-symlink-dir.js
@@ -18,11 +18,11 @@ tmpdir.refresh();
const linkTargets = [
'relative-target',
- path.join(tmpdir.path, 'absolute-target')
+ path.join(tmpdir.path, 'absolute-target'),
];
const linkPaths = [
path.relative(process.cwd(), path.join(tmpdir.path, 'relative-path')),
- path.join(tmpdir.path, 'absolute-path')
+ path.join(tmpdir.path, 'absolute-path'),
];
function testSync(target, path) {
diff --git a/test/parallel/test-fs-syncwritestream.js b/test/parallel/test-fs-syncwritestream.js
index 8fbe665a4047d0..35591876e849d4 100644
--- a/test/parallel/test-fs-syncwritestream.js
+++ b/test/parallel/test-fs-syncwritestream.js
@@ -36,6 +36,6 @@ proc.on('close', common.mustCall(() => {
assert.deepStrictEqual(JSON.parse(fs.readFileSync(filename, 'utf8')), [
{ instance: true, readable: false, writable: true },
- { instance: true, readable: false, writable: true }
+ { instance: true, readable: false, writable: true },
]);
}));
diff --git a/test/parallel/test-fs-utils-get-dirents.js b/test/parallel/test-fs-utils-get-dirents.js
index 6afe6dbca3e529..0cc6cd40243f19 100644
--- a/test/parallel/test-fs-utils-get-dirents.js
+++ b/test/parallel/test-fs-utils-get-dirents.js
@@ -61,7 +61,7 @@ const filename = 'foo';
err.message,
[
'The "path" argument must be of type string or an ' +
- 'instance of Buffer. Received type number (42)'
+ 'instance of Buffer. Received type number (42)',
].join(''));
},
));
@@ -116,7 +116,7 @@ const filename = 'foo';
err.message,
[
'The "path" argument must be of type string or an ' +
- 'instance of Buffer. Received type number (42)'
+ 'instance of Buffer. Received type number (42)',
].join(''));
},
));
diff --git a/test/parallel/test-fs-watch.js b/test/parallel/test-fs-watch.js
index 496cff90dce92f..6fcf6c4df63fdc 100644
--- a/test/parallel/test-fs-watch.js
+++ b/test/parallel/test-fs-watch.js
@@ -35,7 +35,7 @@ const cases = [
'watch2',
'bar',
'dirPath'
- )
+ ),
];
const tmpdir = require('../common/tmpdir');
diff --git a/test/parallel/test-global.js b/test/parallel/test-global.js
index 598f0c7b09f8f4..dbd3b06d290d31 100644
--- a/test/parallel/test-global.js
+++ b/test/parallel/test-global.js
@@ -50,7 +50,7 @@ builtinModules.forEach((moduleName) => {
'performance',
'setImmediate',
'setInterval',
- 'setTimeout'
+ 'setTimeout',
];
assert.deepStrictEqual(new Set(Object.keys(global)), new Set(expected));
}
diff --git a/test/parallel/test-heapsnapshot-near-heap-limit-bounded.js b/test/parallel/test-heapsnapshot-near-heap-limit-bounded.js
index 16d1f915fee3c3..a57b9a8fc4b5e5 100644
--- a/test/parallel/test-heapsnapshot-near-heap-limit-bounded.js
+++ b/test/parallel/test-heapsnapshot-near-heap-limit-bounded.js
@@ -21,7 +21,7 @@ const env = {
'--trace-gc',
'--heapsnapshot-near-heap-limit=1',
'--max-old-space-size=50',
- fixtures.path('workload', 'bounded.js')
+ fixtures.path('workload', 'bounded.js'),
], {
cwd: tmpdir.path,
env,
diff --git a/test/parallel/test-heapsnapshot-near-heap-limit-worker.js b/test/parallel/test-heapsnapshot-near-heap-limit-worker.js
index 48845bdad00a48..46744cbd44d82c 100644
--- a/test/parallel/test-heapsnapshot-near-heap-limit-worker.js
+++ b/test/parallel/test-heapsnapshot-near-heap-limit-worker.js
@@ -14,7 +14,7 @@ const env = {
{
tmpdir.refresh();
const child = spawnSync(process.execPath, [
- fixtures.path('workload', 'grow-worker.js')
+ fixtures.path('workload', 'grow-worker.js'),
], {
cwd: tmpdir.path,
env: {
diff --git a/test/parallel/test-heapsnapshot-near-heap-limit.js b/test/parallel/test-heapsnapshot-near-heap-limit.js
index 92e06cb25e44e4..5743f71a3f568c 100644
--- a/test/parallel/test-heapsnapshot-near-heap-limit.js
+++ b/test/parallel/test-heapsnapshot-near-heap-limit.js
@@ -16,7 +16,7 @@ const env = {
const child = spawnSync(process.execPath, [
'--heapsnapshot-near-heap-limit=-15',
'--max-old-space-size=50',
- fixtures.path('workload', 'grow.js')
+ fixtures.path('workload', 'grow.js'),
], {
cwd: tmpdir.path,
env,
@@ -31,7 +31,7 @@ const env = {
'--trace-gc',
'--heapsnapshot-near-heap-limit=0',
'--max-old-space-size=50',
- fixtures.path('workload', 'grow.js')
+ fixtures.path('workload', 'grow.js'),
], {
cwd: tmpdir.path,
env,
@@ -52,7 +52,7 @@ const env = {
'--trace-gc',
'--heapsnapshot-near-heap-limit=1',
'--max-old-space-size=50',
- fixtures.path('workload', 'grow.js')
+ fixtures.path('workload', 'grow.js'),
], {
cwd: tmpdir.path,
env,
@@ -78,7 +78,7 @@ const env = {
'--trace-gc',
'--heapsnapshot-near-heap-limit=3',
'--max-old-space-size=50',
- fixtures.path('workload', 'grow.js')
+ fixtures.path('workload', 'grow.js'),
], {
cwd: tmpdir.path,
env,
diff --git a/test/parallel/test-http-client-headers-array.js b/test/parallel/test-http-client-headers-array.js
index 31ee35a123ccb9..2665c3a97bcf77 100644
--- a/test/parallel/test-http-client-headers-array.js
+++ b/test/parallel/test-http-client-headers-array.js
@@ -44,11 +44,11 @@ execute({ headers: { 'x-foo': 'boom', 'cookie': 'a=1; b=2; c=3' } });
execute({ headers: { 'x-foo': 'boom', 'cookie': [ 'a=1', 'b=2', 'c=3' ] } });
execute({ headers: [[ 'x-foo', 'boom' ], [ 'cookie', 'a=1; b=2; c=3' ]] });
execute({ headers: [
- [ 'x-foo', 'boom' ], [ 'cookie', [ 'a=1', 'b=2', 'c=3' ]]
+ [ 'x-foo', 'boom' ], [ 'cookie', [ 'a=1', 'b=2', 'c=3' ]],
] });
execute({ headers: [
[ 'x-foo', 'boom' ], [ 'cookie', 'a=1' ],
- [ 'cookie', 'b=2' ], [ 'cookie', 'c=3']
+ [ 'cookie', 'b=2' ], [ 'cookie', 'c=3'],
] });
// Authorization and Host header both missing from the second
@@ -56,5 +56,5 @@ execute({ auth: 'foo:bar', headers:
{ 'x-foo': 'boom', 'cookie': 'a=1; b=2; c=3' } });
execute({ auth: 'foo:bar', headers: [
[ 'x-foo', 'boom' ], [ 'cookie', 'a=1' ],
- [ 'cookie', 'b=2' ], [ 'cookie', 'c=3']
+ [ 'cookie', 'b=2' ], [ 'cookie', 'c=3'],
] });
diff --git a/test/parallel/test-http-client-parse-error.js b/test/parallel/test-http-client-parse-error.js
index 305a7bc170b693..2c18bdbede0139 100644
--- a/test/parallel/test-http-client-parse-error.js
+++ b/test/parallel/test-http-client-parse-error.js
@@ -29,7 +29,7 @@ const countdown = new Countdown(2, () => server.close());
const payloads = [
'HTTP/1.1 302 Object Moved\r\nContent-Length: 0\r\n\r\nhi world',
- 'bad http = should trigger parse error'
+ 'bad http = should trigger parse error',
];
// Create a TCP server
diff --git a/test/parallel/test-http-debug.js b/test/parallel/test-http-debug.js
index 4b1c093c663974..3907412203d3b0 100644
--- a/test/parallel/test-http-debug.js
+++ b/test/parallel/test-http-debug.js
@@ -7,7 +7,7 @@ const path = require('path');
process.env.NODE_DEBUG = 'http';
const { stderr } = child_process.spawnSync(process.execPath, [
- path.resolve(__dirname, 'test-http-conn-reset.js')
+ path.resolve(__dirname, 'test-http-conn-reset.js'),
], { encoding: 'utf8' });
assert(stderr.match(/Setting the NODE_DEBUG environment variable to 'http' can expose sensitive data \(such as passwords, tokens and authentication headers\) in the resulting log\./),
diff --git a/test/parallel/test-http-default-port.js b/test/parallel/test-http-default-port.js
index a5af439a8ec6c3..2005487502fe4f 100644
--- a/test/parallel/test-http-default-port.js
+++ b/test/parallel/test-http-default-port.js
@@ -37,7 +37,7 @@ const options = {
for (const { mod, createServer } of [
{ mod: http, createServer: http.createServer },
- { mod: https, createServer: https.createServer.bind(null, options) }
+ { mod: https, createServer: https.createServer.bind(null, options) },
]) {
const server = createServer(common.mustCall((req, res) => {
assert.strictEqual(req.headers.host, hostExpect);
diff --git a/test/parallel/test-http-header-validators.js b/test/parallel/test-http-header-validators.js
index fb23bd4885c766..89cf974da02247 100644
--- a/test/parallel/test-http-header-validators.js
+++ b/test/parallel/test-http-header-validators.js
@@ -14,7 +14,7 @@ console.log('validateHeaderName');
'user-agent',
'USER-AGENT',
'User-Agent',
- 'x-forwarded-for'
+ 'x-forwarded-for',
].forEach((name) => {
console.log('does not throw for "%s"', name);
validateHeaderName(name);
diff --git a/test/parallel/test-http-host-header-ipv6-fail.js b/test/parallel/test-http-host-header-ipv6-fail.js
index 3552e38856ed06..e84e9ab05b2196 100644
--- a/test/parallel/test-http-host-header-ipv6-fail.js
+++ b/test/parallel/test-http-host-header-ipv6-fail.js
@@ -15,7 +15,7 @@ const net = require('net');
const requests = [
{ host: 'foo:1234', headers: { expectedhost: 'foo:1234:80' } },
- { host: '::1', headers: { expectedhost: '[::1]:80' } }
+ { host: '::1', headers: { expectedhost: '[::1]:80' } },
];
function createLocalConnection(options) {
diff --git a/test/parallel/test-http-invalidheaderfield2.js b/test/parallel/test-http-invalidheaderfield2.js
index 40415d9c368891..1b4e9e6edb01f3 100644
--- a/test/parallel/test-http-invalidheaderfield2.js
+++ b/test/parallel/test-http-invalidheaderfield2.js
@@ -25,7 +25,7 @@ const { _checkIsHttpToken, _checkInvalidHeaderChar } = require('_http_common');
'It\'s_fun',
'2*3',
'4+2',
- '3.14159265359'
+ '3.14159265359',
].forEach(function(str) {
assert.strictEqual(
_checkIsHttpToken(str), true,
@@ -51,7 +51,7 @@ const { _checkIsHttpToken, _checkInvalidHeaderChar } = require('_http_common');
'End)',
'End]',
'"Quote"',
- 'This,That'
+ 'This,That',
].forEach(function(str) {
assert.strictEqual(
_checkIsHttpToken(str), false,
@@ -64,7 +64,7 @@ const { _checkIsHttpToken, _checkInvalidHeaderChar } = require('_http_common');
'foo bar',
'foo\tbar',
'0123456789ABCdef',
- '!@#$%^&*()-_=+\\;\':"[]{}<>,./?|~`'
+ '!@#$%^&*()-_=+\\;\':"[]{}<>,./?|~`',
].forEach(function(str) {
assert.strictEqual(
_checkInvalidHeaderChar(str), false,
@@ -80,7 +80,7 @@ const { _checkIsHttpToken, _checkInvalidHeaderChar } = require('_http_common');
'\x7FMe!',
'Testing 123\x00',
'foo\vbar',
- 'Ding!\x07'
+ 'Ding!\x07',
].forEach(function(str) {
assert.strictEqual(
_checkInvalidHeaderChar(str), true,
diff --git a/test/parallel/test-http-max-headers-count.js b/test/parallel/test-http-max-headers-count.js
index 9fcfe316e392ff..b707c62bfba8c7 100644
--- a/test/parallel/test-http-max-headers-count.js
+++ b/test/parallel/test-http-max-headers-count.js
@@ -36,7 +36,7 @@ for (let i = 0; i < N; ++i) {
const maxAndExpected = [ // for server
[50, 50],
[1500, 102],
- [0, N + 2] // Host and Connection
+ [0, N + 2], // Host and Connection
];
let max = maxAndExpected[requests][0];
let expected = maxAndExpected[requests][1];
@@ -57,7 +57,7 @@ server.listen(0, function() {
const maxAndExpected = [ // for client
[20, 20],
[1200, 103],
- [0, N + 3] // Connection, Date and Transfer-Encoding
+ [0, N + 3], // Connection, Date and Transfer-Encoding
];
doRequest();
diff --git a/test/parallel/test-http-mutable-headers.js b/test/parallel/test-http-mutable-headers.js
index 755a4dd66159e8..46f57832af156d 100644
--- a/test/parallel/test-http-mutable-headers.js
+++ b/test/parallel/test-http-mutable-headers.js
@@ -36,7 +36,7 @@ let test = 'headers';
const content = 'hello world\n';
const cookies = [
'session_token=; path=/; expires=Sun, 15-Sep-2030 13:48:52 GMT',
- 'prefers_open_id=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT'
+ 'prefers_open_id=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT',
];
const s = http.createServer(common.mustCall((req, res) => {
@@ -121,7 +121,7 @@ const s = http.createServer(common.mustCall((req, res) => {
true,
{},
{ toString: () => 'X-TEST-HEADER2' },
- () => { }
+ () => { },
].forEach((val) => {
assert.throws(
() => res.hasHeader(val),
diff --git a/test/parallel/test-http-parser-freed-before-upgrade.js b/test/parallel/test-http-parser-freed-before-upgrade.js
index 4ba1de9501681c..d0f1409f1d2b43 100644
--- a/test/parallel/test-http-parser-freed-before-upgrade.js
+++ b/test/parallel/test-http-parser-freed-before-upgrade.js
@@ -12,7 +12,7 @@ server.on('upgrade', common.mustCall((request, socket) => {
'HTTP/1.1 101 Switching Protocols',
'Connection: Upgrade',
'Upgrade: WebSocket',
- '\r\n'
+ '\r\n',
].join('\r\n'));
}));
diff --git a/test/parallel/test-http-parser-lazy-loaded.js b/test/parallel/test-http-parser-lazy-loaded.js
index 3c4a7e7ce9f35d..44bb59f052e6ce 100644
--- a/test/parallel/test-http-parser-lazy-loaded.js
+++ b/test/parallel/test-http-parser-lazy-loaded.js
@@ -31,7 +31,7 @@ assert.strictEqual(parser.test_type, DummyParser.REQUEST);
if (process.argv[2] !== 'child') {
// Also test in a child process with IPC (specific case of https://github.com/nodejs/node/issues/23716)
const child = spawn(process.execPath, [
- '--expose-internals', __filename, 'child'
+ '--expose-internals', __filename, 'child',
], {
stdio: ['inherit', 'inherit', 'inherit', 'ipc']
});
diff --git a/test/parallel/test-http-perf_hooks.js b/test/parallel/test-http-perf_hooks.js
index e02eab886fcf6b..826211472f222c 100644
--- a/test/parallel/test-http-perf_hooks.js
+++ b/test/parallel/test-http-perf_hooks.js
@@ -53,7 +53,7 @@ server.listen(0, common.mustCall(async () => {
path: '/',
method: 'POST',
data: expected
- })
+ }),
]);
server.close();
}));
diff --git a/test/parallel/test-http-proxy.js b/test/parallel/test-http-proxy.js
index 6a986024af29be..af3497630b7f79 100644
--- a/test/parallel/test-http-proxy.js
+++ b/test/parallel/test-http-proxy.js
@@ -27,7 +27,7 @@ const url = require('url');
const cookies = [
'session_token=; path=/; expires=Sun, 15-Sep-2030 13:48:52 GMT',
- 'prefers_open_id=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT'
+ 'prefers_open_id=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT',
];
const headers = { 'content-type': 'text/plain',
diff --git a/test/parallel/test-http-raw-headers.js b/test/parallel/test-http-raw-headers.js
index 8ce20db351302c..d77a7cacc64c29 100644
--- a/test/parallel/test-http-raw-headers.js
+++ b/test/parallel/test-http-raw-headers.js
@@ -34,7 +34,7 @@ http.createServer(function(req, res) {
'x-BaR',
'yoyoyo',
'Connection',
- 'close'
+ 'close',
];
const expectHeaders = {
'host': `localhost:${this.address().port}`,
@@ -50,7 +50,7 @@ http.createServer(function(req, res) {
'X-bAr',
'yOyOyOy',
'X-baR',
- 'OyOyOyO'
+ 'OyOyOyO',
];
const expectTrailers = { 'x-bar': 'yOyOyOy, OyOyOyO, yOyOyOy, OyOyOyO' };
@@ -70,7 +70,7 @@ http.createServer(function(req, res) {
['x-fOo', 'xOxOxOx'],
['x-foO', 'OxOxOxO'],
['X-fOo', 'xOxOxOx'],
- ['X-foO', 'OxOxOxO']
+ ['X-foO', 'OxOxOxO'],
]);
res.end('x f o o');
}).listen(0, function() {
@@ -79,7 +79,7 @@ http.createServer(function(req, res) {
['x-bAr', 'yOyOyOy'],
['x-baR', 'OyOyOyO'],
['X-bAr', 'yOyOyOy'],
- ['X-baR', 'OyOyOyO']
+ ['X-baR', 'OyOyOyO'],
]);
req.setHeader('transfer-ENCODING', 'CHUNKED');
req.setHeader('x-BaR', 'yoyoyo');
@@ -93,7 +93,7 @@ http.createServer(function(req, res) {
'Connection',
'close',
'Transfer-Encoding',
- 'chunked'
+ 'chunked',
];
const expectHeaders = {
'trailer': 'x-foo',
@@ -114,7 +114,7 @@ http.createServer(function(req, res) {
'X-fOo',
'xOxOxOx',
'X-foO',
- 'OxOxOxO'
+ 'OxOxOxO',
];
const expectTrailers = { 'x-foo': 'xOxOxOx, OxOxOxO, xOxOxOx, OxOxOxO' };
diff --git a/test/parallel/test-http-response-multiheaders.js b/test/parallel/test-http-response-multiheaders.js
index 31cb59546c698c..39840ce06957ec 100644
--- a/test/parallel/test-http-response-multiheaders.js
+++ b/test/parallel/test-http-response-multiheaders.js
@@ -26,7 +26,7 @@ const norepeat = [
'last-modified',
'server',
'age',
- 'expires'
+ 'expires',
];
const runCount = 2;
diff --git a/test/parallel/test-http-response-status-message.js b/test/parallel/test-http-response-status-message.js
index c4256d9e5a0c49..3c22e40b43bf02 100644
--- a/test/parallel/test-http-response-status-message.js
+++ b/test/parallel/test-http-response-status-message.js
@@ -36,7 +36,7 @@ const testCases = [
{ path: '/missing', statusMessage: '',
response: 'HTTP/1.1 200 \r\n\r\n' },
{ path: '/missing-no-space', statusMessage: '',
- response: 'HTTP/1.1 200\r\n\r\n' }
+ response: 'HTTP/1.1 200\r\n\r\n' },
];
testCases.findByPath = function(path) {
const matching = this.filter(function(testCase) {
diff --git a/test/parallel/test-http-server-keepalive-end.js b/test/parallel/test-http-server-keepalive-end.js
index 8ebdecb97c3d8c..9d1bc0bfc0d116 100644
--- a/test/parallel/test-http-server-keepalive-end.js
+++ b/test/parallel/test-http-server-keepalive-end.js
@@ -31,7 +31,7 @@ server.listen(0, common.mustCall(() => {
'Content-Length: 11',
'',
'hello world',
- ''
+ '',
].join('\r\n');
client.end(req);
diff --git a/test/parallel/test-http-server-keepalive-req-gc.js b/test/parallel/test-http-server-keepalive-req-gc.js
index e94845d38df098..0c68ebab763223 100644
--- a/test/parallel/test-http-server-keepalive-req-gc.js
+++ b/test/parallel/test-http-server-keepalive-req-gc.js
@@ -32,7 +32,7 @@ server.listen(0, common.mustCall(() => {
'Content-Length: 11',
'',
'hello world',
- ''
+ '',
].join('\r\n');
client.write(req);
diff --git a/test/parallel/test-http-should-keep-alive.js b/test/parallel/test-http-should-keep-alive.js
index 038af47ee4db97..dfc99cf4f3b3a1 100644
--- a/test/parallel/test-http-should-keep-alive.js
+++ b/test/parallel/test-http-should-keep-alive.js
@@ -32,7 +32,7 @@ const SERVER_RESPONSES = [
'HTTP/1.0 200 ok\r\nContent-Length: 0\r\nConnection: close\r\n\r\n',
'HTTP/1.1 200 ok\r\nContent-Length: 0\r\n\r\n',
'HTTP/1.1 200 ok\r\nContent-Length: 0\r\nConnection: keep-alive\r\n\r\n',
- 'HTTP/1.1 200 ok\r\nContent-Length: 0\r\nConnection: close\r\n\r\n'
+ 'HTTP/1.1 200 ok\r\nContent-Length: 0\r\nConnection: close\r\n\r\n',
];
const SHOULD_KEEP_ALIVE = [
false, // HTTP/1.0, default
@@ -40,7 +40,7 @@ const SHOULD_KEEP_ALIVE = [
false, // HTTP/1.0, Connection: close
true, // HTTP/1.1, default
true, // HTTP/1.1, Connection: keep-alive
- false // HTTP/1.1, Connection: close
+ false, // HTTP/1.1, Connection: close
];
http.globalAgent.maxSockets = 5;
diff --git a/test/parallel/test-http-upgrade-client.js b/test/parallel/test-http-upgrade-client.js
index 8fe756f469f09a..ea6972a18c7d49 100644
--- a/test/parallel/test-http-upgrade-client.js
+++ b/test/parallel/test-http-upgrade-client.js
@@ -60,8 +60,8 @@ server.listen(0, '127.0.0.1', common.mustCall(function() {
['Host', 'echo.websocket.org'],
['Connection', 'Upgrade'],
['Upgrade', 'websocket'],
- ['Origin', 'http://www.websocket.org']
- ]
+ ['Origin', 'http://www.websocket.org'],
+ ],
];
const countdown = new Countdown(headers.length, () => server.close());
diff --git a/test/parallel/test-http-url.parse-only-support-http-https-protocol.js b/test/parallel/test-http-url.parse-only-support-http-https-protocol.js
index 6dcb2a852e7199..9b2a575ba7b1d7 100644
--- a/test/parallel/test-http-url.parse-only-support-http-https-protocol.js
+++ b/test/parallel/test-http-url.parse-only-support-http-https-protocol.js
@@ -31,7 +31,7 @@ const invalidUrls = [
'ftp://www.example.com',
'javascript:alert(\'hello\');',
'xmpp:foo@bar.com',
- 'f://some.host/path'
+ 'f://some.host/path',
];
invalidUrls.forEach((invalid) => {
diff --git a/test/parallel/test-http2-altsvc.js b/test/parallel/test-http2-altsvc.js
index 39a3ca97b78bf3..c5abfc33265330 100644
--- a/test/parallel/test-http2-altsvc.js
+++ b/test/parallel/test-http2-altsvc.js
@@ -75,7 +75,7 @@ server.on('session', common.mustCall((session) => {
'abc:',
new URL('abc:'),
{ origin: 'null' },
- { origin: '' }
+ { origin: '' },
].forEach((input) => {
assert.throws(
() => session.altsvc('h2=":8000', input),
diff --git a/test/parallel/test-http2-client-destroy.js b/test/parallel/test-http2-client-destroy.js
index 189a6f55a596da..c407ef1f508466 100644
--- a/test/parallel/test-http2-client-destroy.js
+++ b/test/parallel/test-http2-client-destroy.js
@@ -15,7 +15,7 @@ const { getEventListeners } = require('events');
server.listen(0, common.mustCall(() => {
const destroyCallbacks = [
(client) => client.destroy(),
- (client) => client[kSocket].destroy()
+ (client) => client[kSocket].destroy(),
];
const countdown = new Countdown(destroyCallbacks.length, () => {
diff --git a/test/parallel/test-http2-client-onconnect-errors.js b/test/parallel/test-http2-client-onconnect-errors.js
index 788386ae864e16..04cbfe5befaeec 100644
--- a/test/parallel/test-http2-client-onconnect-errors.js
+++ b/test/parallel/test-http2-client-onconnect-errors.js
@@ -21,7 +21,7 @@ const { NghttpError } = require('internal/http2/util');
const specificTestKeys = [
'NGHTTP2_ERR_STREAM_ID_NOT_AVAILABLE',
- 'NGHTTP2_ERR_INVALID_ARGUMENT'
+ 'NGHTTP2_ERR_INVALID_ARGUMENT',
];
const specificTests = [
diff --git a/test/parallel/test-http2-client-settings-before-connect.js b/test/parallel/test-http2-client-settings-before-connect.js
index a02a26446995ac..406ddd86ab5e9b 100644
--- a/test/parallel/test-http2-client-settings-before-connect.js
+++ b/test/parallel/test-http2-client-settings-before-connect.js
@@ -38,7 +38,7 @@ server.listen(0, common.mustCall(() => {
['enablePush', 1, TypeError],
['enablePush', 0, TypeError],
['enablePush', null, TypeError],
- ['enablePush', {}, TypeError]
+ ['enablePush', {}, TypeError],
].forEach(([name, value, errorType]) =>
assert.throws(
() => client.settings({ [name]: value }),
diff --git a/test/parallel/test-http2-client-write-empty-string.js b/test/parallel/test-http2-client-write-empty-string.js
index 087a498a37b462..f0f0b8f0124964 100644
--- a/test/parallel/test-http2-client-write-empty-string.js
+++ b/test/parallel/test-http2-client-write-empty-string.js
@@ -9,7 +9,7 @@ const http2 = require('http2');
for (const chunkSequence of [
[ '' ],
- [ '', '' ]
+ [ '', '' ],
]) {
const server = http2.createServer();
server.on('stream', common.mustCall((stream, headers, flags) => {
diff --git a/test/parallel/test-http2-compat-serverrequest-trailers.js b/test/parallel/test-http2-compat-serverrequest-trailers.js
index 735ff1345e1a39..620ae69029a375 100644
--- a/test/parallel/test-http2-compat-serverrequest-trailers.js
+++ b/test/parallel/test-http2-compat-serverrequest-trailers.js
@@ -35,7 +35,7 @@ server.listen(0, common.mustCall(function() {
'x-foo',
'OxOxOxO',
'x-foo-test',
- 'test, test'
+ 'test, test',
], request.rawTrailers);
assert.strictEqual(data, 'test\ntest');
response.end();
diff --git a/test/parallel/test-http2-compat-serverresponse-destroy.js b/test/parallel/test-http2-compat-serverresponse-destroy.js
index 0d73c82c2d862f..94d67330e86061 100644
--- a/test/parallel/test-http2-compat-serverresponse-destroy.js
+++ b/test/parallel/test-http2-compat-serverresponse-destroy.js
@@ -11,7 +11,7 @@ const Countdown = require('../common/countdown');
const errors = [
'test-error',
- Error('test')
+ Error('test'),
];
let nextError;
diff --git a/test/parallel/test-http2-compat-serverresponse-headers.js b/test/parallel/test-http2-compat-serverresponse-headers.js
index 19720b1e41f2bd..8b9b6d69278c60 100644
--- a/test/parallel/test-http2-compat-serverresponse-headers.js
+++ b/test/parallel/test-http2-compat-serverresponse-headers.js
@@ -58,7 +58,7 @@ server.listen(0, common.mustCall(function() {
':method',
':path',
':authority',
- ':scheme'
+ ':scheme',
].forEach((header) => assert.throws(
() => response.setHeader(header, 'foobar'),
{
diff --git a/test/parallel/test-http2-compat-serverresponse-writehead-array.js b/test/parallel/test-http2-compat-serverresponse-writehead-array.js
index d856165d090f46..c28f7329c1d0a1 100644
--- a/test/parallel/test-http2-compat-serverresponse-writehead-array.js
+++ b/test/parallel/test-http2-compat-serverresponse-writehead-array.js
@@ -14,7 +14,7 @@ server.listen(0, common.mustCall(() => {
server.once('request', common.mustCall((request, response) => {
const returnVal = response.writeHead(200, [
['foo', 'bar'],
- ['ABC', 123]
+ ['ABC', 123],
]);
assert.strictEqual(returnVal, response);
response.end(common.mustCall(() => { server.close(); }));
diff --git a/test/parallel/test-http2-cookies.js b/test/parallel/test-http2-cookies.js
index fcd6b847587470..a270c1d73b1ba1 100644
--- a/test/parallel/test-http2-cookies.js
+++ b/test/parallel/test-http2-cookies.js
@@ -11,7 +11,7 @@ const server = h2.createServer();
const setCookie = [
'a=b',
'c=d; Wed, 21 Oct 2015 07:28:00 GMT; Secure; HttpOnly',
- 'e=f'
+ 'e=f',
];
// We use the lower-level API here
diff --git a/test/parallel/test-http2-create-client-connect.js b/test/parallel/test-http2-create-client-connect.js
index 5723fcecd6f069..9859fe10677155 100644
--- a/test/parallel/test-http2-create-client-connect.js
+++ b/test/parallel/test-http2-create-client-connect.js
@@ -22,7 +22,7 @@ const url = require('url');
[new URL(`http://localhost:${port}`)],
[url.parse(`http://localhost:${port}`)],
[{ port }, { protocol: 'http:' }],
- [{ port, hostname: '127.0.0.1' }, { protocol: 'http:' }]
+ [{ port, hostname: '127.0.0.1' }, { protocol: 'http:' }],
];
const serverClose = new Countdown(items.length + 1,
@@ -66,7 +66,7 @@ const url = require('url');
[new URL(`https://localhost:${port}`), opts],
[url.parse(`https://localhost:${port}`), opts],
[{ port: port, protocol: 'https:' }, opts],
- [{ port: port, hostname: '127.0.0.1', protocol: 'https:' }, opts]
+ [{ port: port, hostname: '127.0.0.1', protocol: 'https:' }, opts],
];
const serverClose = new Countdown(items.length,
diff --git a/test/parallel/test-http2-debug.js b/test/parallel/test-http2-debug.js
index 0d6b5f677c234b..a465f74af24698 100644
--- a/test/parallel/test-http2-debug.js
+++ b/test/parallel/test-http2-debug.js
@@ -9,7 +9,7 @@ const path = require('path');
process.env.NODE_DEBUG_NATIVE = 'http2';
process.env.NODE_DEBUG = 'http2';
const { stdout, stderr } = child_process.spawnSync(process.execPath, [
- path.resolve(__dirname, 'test-http2-ping.js')
+ path.resolve(__dirname, 'test-http2-ping.js'),
], { encoding: 'utf8' });
assert(stderr.match(/Setting the NODE_DEBUG environment variable to 'http2' can expose sensitive data \(such as passwords, tokens and authentication headers\) in the resulting log\.\r?\n/),
diff --git a/test/parallel/test-http2-error-order.js b/test/parallel/test-http2-error-order.js
index 8bf0f03dba8ea3..4ea71cf1d00ca4 100644
--- a/test/parallel/test-http2-error-order.js
+++ b/test/parallel/test-http2-error-order.js
@@ -12,7 +12,7 @@ const expected = [
'Stream:created',
'Stream:error',
'Stream:close',
- 'Request:error'
+ 'Request:error',
];
const server = createServer();
diff --git a/test/parallel/test-http2-getpackedsettings.js b/test/parallel/test-http2-getpackedsettings.js
index 374e537d5634aa..4f5970522f13b3 100644
--- a/test/parallel/test-http2-getpackedsettings.js
+++ b/test/parallel/test-http2-getpackedsettings.js
@@ -28,7 +28,7 @@ assert.deepStrictEqual(val, check);
['maxHeaderListSize', 0],
['maxHeaderListSize', 2 ** 32 - 1],
['maxHeaderSize', 0],
- ['maxHeaderSize', 2 ** 32 - 1]
+ ['maxHeaderSize', 2 ** 32 - 1],
].forEach((i) => {
// Valid options should not throw.
http2.getPackedSettings({ [i[0]]: i[1] });
@@ -49,7 +49,7 @@ http2.getPackedSettings({ enablePush: false });
['maxHeaderListSize', -1],
['maxHeaderListSize', 2 ** 32],
['maxHeaderSize', -1],
- ['maxHeaderSize', 2 ** 32]
+ ['maxHeaderSize', 2 ** 32],
].forEach((i) => {
assert.throws(() => {
http2.getPackedSettings({ [i[0]]: i[1] });
@@ -61,7 +61,7 @@ http2.getPackedSettings({ enablePush: false });
});
[
- 1, null, '', Infinity, new Date(), {}, NaN, [false]
+ 1, null, '', Infinity, new Date(), {}, NaN, [false],
].forEach((i) => {
assert.throws(() => {
http2.getPackedSettings({ enablePush: i });
@@ -73,7 +73,7 @@ http2.getPackedSettings({ enablePush: false });
});
[
- 1, null, '', Infinity, new Date(), {}, NaN, [false]
+ 1, null, '', Infinity, new Date(), {}, NaN, [false],
].forEach((i) => {
assert.throws(() => {
http2.getPackedSettings({ enableConnectProtocol: i });
@@ -92,7 +92,7 @@ http2.getPackedSettings({ enablePush: false });
0x00, 0x04, 0x00, 0x00, 0x00, 0x64,
0x00, 0x05, 0x00, 0x00, 0x4e, 0x20,
0x00, 0x06, 0x00, 0x00, 0x00, 0x64,
- 0x00, 0x08, 0x00, 0x00, 0x00, 0x00
+ 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
]);
const packed = http2.getPackedSettings({
diff --git a/test/parallel/test-http2-misbehaving-flow-control-paused.js b/test/parallel/test-http2-misbehaving-flow-control-paused.js
index d8f37c4394aa94..e54bb83238e7fa 100644
--- a/test/parallel/test-http2-misbehaving-flow-control-paused.js
+++ b/test/parallel/test-http2-misbehaving-flow-control-paused.js
@@ -25,13 +25,13 @@ const preamble = Buffer.from([
0xa0, 0xe4, 0x1d, 0x13, 0x9d, 0x09, 0xb8, 0xf0, 0x1e, 0x07, 0x53,
0x03, 0x2a, 0x2f, 0x2a, 0x90, 0x7a, 0x8a, 0xaa, 0x69, 0xd2, 0x9a,
0xc4, 0xc0, 0x57, 0x0b, 0xcb, 0x87, 0x0f, 0x0d, 0x83, 0x08, 0x00,
- 0x0f
+ 0x0f,
]);
const data = Buffer.from([
0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d,
0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x0a, 0x68, 0x65, 0x6c,
- 0x6c, 0x6f, 0x0a, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x0a
+ 0x6c, 0x6f, 0x0a, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x0a,
]);
// This is testing the case of a misbehaving client that is not paying
diff --git a/test/parallel/test-http2-misbehaving-flow-control.js b/test/parallel/test-http2-misbehaving-flow-control.js
index 97f8c17f4ff85d..6774be2237b109 100644
--- a/test/parallel/test-http2-misbehaving-flow-control.js
+++ b/test/parallel/test-http2-misbehaving-flow-control.js
@@ -25,7 +25,7 @@ const preamble = Buffer.from([
0xa0, 0xe4, 0x1d, 0x13, 0x9d, 0x09, 0xb8, 0xf0, 0x1e, 0x07, 0x53,
0x03, 0x2a, 0x2f, 0x2a, 0x90, 0x7a, 0x8a, 0xaa, 0x69, 0xd2, 0x9a,
0xc4, 0xc0, 0x57, 0x0b, 0xcb, 0x87, 0x0f, 0x0d, 0x83, 0x08, 0x00,
- 0x0f
+ 0x0f,
]);
const data = Buffer.from([
@@ -46,7 +46,7 @@ const data = Buffer.from([
0x6c, 0x6f, 0x0a, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x0a,
0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d,
0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x0a, 0x68, 0x65, 0x6c,
- 0x6c, 0x6f, 0x0a, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x0a
+ 0x6c, 0x6f, 0x0a, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x0a,
]);
// This is testing the case of a misbehaving client that is not paying
diff --git a/test/parallel/test-http2-misused-pseudoheaders.js b/test/parallel/test-http2-misused-pseudoheaders.js
index 2ae3a1ddbfaf3f..230843c619ce7c 100644
--- a/test/parallel/test-http2-misused-pseudoheaders.js
+++ b/test/parallel/test-http2-misused-pseudoheaders.js
@@ -13,7 +13,7 @@ server.on('stream', common.mustCall((stream) => {
':path',
':authority',
':method',
- ':scheme'
+ ':scheme',
].forEach((i) => {
assert.throws(() => stream.respond({ [i]: '/' }),
{
diff --git a/test/parallel/test-http2-multiheaders-raw.js b/test/parallel/test-http2-multiheaders-raw.js
index 32bf9d05433d42..8e80a1c6312a91 100644
--- a/test/parallel/test-http2-multiheaders-raw.js
+++ b/test/parallel/test-http2-multiheaders-raw.js
@@ -31,7 +31,7 @@ server.on('stream', common.mustCall((stream, headers, flags, rawHeaders) => {
'www-authenticate',
'baz',
'test',
- 'foo, bar, baz'
+ 'foo, bar, baz',
];
assert.deepStrictEqual(rawHeaders, expected);
diff --git a/test/parallel/test-http2-origin.js b/test/parallel/test-http2-origin.js
index 519e8cb1a3dedd..5193af6d99ef7e 100644
--- a/test/parallel/test-http2-origin.js
+++ b/test/parallel/test-http2-origin.js
@@ -85,7 +85,7 @@ const ca = readKey('fake-startcom-root-cert.pem', 'binary');
const client = connect(originSet[0], { ca });
const checks = [
['https://foo.org', 'https://bar.org'],
- ['https://example.org', 'https://example.com']
+ ['https://example.org', 'https://example.com'],
];
const countdown = new Countdown(3, () => {
diff --git a/test/parallel/test-http2-server-push-stream-errors.js b/test/parallel/test-http2-server-push-stream-errors.js
index 8e4ca37b280fe8..dae037c04f28c9 100644
--- a/test/parallel/test-http2-server-push-stream-errors.js
+++ b/test/parallel/test-http2-server-push-stream-errors.js
@@ -20,7 +20,7 @@ const { NghttpError } = require('internal/http2/util');
const specificTestKeys = [
'NGHTTP2_ERR_STREAM_ID_NOT_AVAILABLE',
- 'NGHTTP2_ERR_STREAM_CLOSED'
+ 'NGHTTP2_ERR_STREAM_CLOSED',
];
const specificTests = [
diff --git a/test/parallel/test-http2-server-rst-stream.js b/test/parallel/test-http2-server-rst-stream.js
index e76db1bf1ab243..9f37ce71472353 100644
--- a/test/parallel/test-http2-server-rst-stream.js
+++ b/test/parallel/test-http2-server-rst-stream.js
@@ -21,7 +21,7 @@ const tests = [
[NGHTTP2_PROTOCOL_ERROR, true, 'NGHTTP2_PROTOCOL_ERROR'],
[NGHTTP2_CANCEL, false],
[NGHTTP2_REFUSED_STREAM, true, 'NGHTTP2_REFUSED_STREAM'],
- [NGHTTP2_INTERNAL_ERROR, true, 'NGHTTP2_INTERNAL_ERROR']
+ [NGHTTP2_INTERNAL_ERROR, true, 'NGHTTP2_INTERNAL_ERROR'],
];
const server = http2.createServer();
diff --git a/test/parallel/test-http2-server-shutdown-options-errors.js b/test/parallel/test-http2-server-shutdown-options-errors.js
index 643d173f78bc43..e6a69b54627e00 100644
--- a/test/parallel/test-http2-server-shutdown-options-errors.js
+++ b/test/parallel/test-http2-server-shutdown-options-errors.js
@@ -13,7 +13,7 @@ const types = [
{},
[],
null,
- new Date()
+ new Date(),
];
server.on('stream', common.mustCall((stream) => {
diff --git a/test/parallel/test-http2-session-settings.js b/test/parallel/test-http2-session-settings.js
index a31682f291479f..571ee87d93768c 100644
--- a/test/parallel/test-http2-session-settings.js
+++ b/test/parallel/test-http2-session-settings.js
@@ -103,7 +103,7 @@ server.listen(
['maxHeaderListSize', -1],
['maxHeaderListSize', 2 ** 32],
['maxHeaderSize', -1],
- ['maxHeaderSize', 2 ** 32]
+ ['maxHeaderSize', 2 ** 32],
].forEach((i) => {
const settings = {};
settings[i[0]] = i[1];
diff --git a/test/parallel/test-http2-single-headers.js b/test/parallel/test-http2-single-headers.js
index 6f20c1b35658d7..c10623b9be7bf0 100644
--- a/test/parallel/test-http2-single-headers.js
+++ b/test/parallel/test-http2-single-headers.js
@@ -19,7 +19,7 @@ const singles = [
'if-unmodified-since',
'from',
'location',
- 'max-forwards'
+ 'max-forwards',
];
server.on('stream', common.mustNotCall());
diff --git a/test/parallel/test-http2-tls-disconnect.js b/test/parallel/test-http2-tls-disconnect.js
index 2e635fe1376a51..42c58c8a4e0975 100644
--- a/test/parallel/test-http2-tls-disconnect.js
+++ b/test/parallel/test-http2-tls-disconnect.js
@@ -21,7 +21,7 @@ const server = http2.createSecureServer({ key, cert }, (request, response) => {
server.listen(0, () => {
const proc = child_process.spawn('h2load', [
'-n', '1000',
- `https://localhost:${server.address().port}/`
+ `https://localhost:${server.address().port}/`,
]);
proc.on('error', (err) => {
if (err.code === 'ENOENT')
diff --git a/test/parallel/test-http2-util-asserts.js b/test/parallel/test-http2-util-asserts.js
index 5bbc1cde43f790..29ba8180494a3c 100644
--- a/test/parallel/test-http2-util-asserts.js
+++ b/test/parallel/test-http2-util-asserts.js
@@ -13,7 +13,7 @@ const {
{},
Object.create(null),
new Date(),
- new (class Foo {})()
+ new (class Foo {})(),
].forEach((input) => {
assertIsObject(input, 'foo', 'Object');
});
@@ -25,7 +25,7 @@ const {
NaN,
Infinity,
[],
- [{}]
+ [{}],
].forEach((input) => {
assert.throws(
() => assertIsObject(input, 'foo', 'Object'),
diff --git a/test/parallel/test-http2-util-headers-list.js b/test/parallel/test-http2-util-headers-list.js
index bc9455731c4908..a25336ee7a8473 100644
--- a/test/parallel/test-http2-util-headers-list.js
+++ b/test/parallel/test-http2-util-headers-list.js
@@ -245,7 +245,7 @@ const {
HTTP2_HEADER_TK,
HTTP2_HEADER_UPGRADE_INSECURE_REQUESTS,
HTTP2_HEADER_USER_AGENT,
- HTTP2_HEADER_X_CONTENT_TYPE_OPTIONS
+ HTTP2_HEADER_X_CONTENT_TYPE_OPTIONS,
].forEach((name) => {
const msg = `Header field "${name}" must only have a single value`;
assert.throws(() => mapToHeaders({ [name]: [1, 2, 3] }), {
@@ -283,7 +283,7 @@ const {
HTTP2_HEADER_VIA,
HTTP2_HEADER_WARNING,
HTTP2_HEADER_WWW_AUTHENTICATE,
- HTTP2_HEADER_X_FRAME_OPTIONS
+ HTTP2_HEADER_X_FRAME_OPTIONS,
].forEach((name) => {
assert(!(mapToHeaders({ [name]: [1, 2, 3] }) instanceof Error), name);
});
@@ -302,7 +302,7 @@ const {
'TE',
'Transfer-Encoding',
'Proxy-Connection',
- 'Keep-Alive'
+ 'Keep-Alive',
].forEach((name) => {
assert.throws(() => mapToHeaders({ [name]: 'abc' }), {
code: 'ERR_HTTP2_INVALID_CONNECTION_HEADERS',
@@ -349,7 +349,7 @@ assert.strictEqual(getAuthority({
'cookie', 'foo',
'set-cookie', 'sc1',
'age', '10',
- 'x-multi', 'first'
+ 'x-multi', 'first',
];
const headers = toHeaderObject(rawHeaders);
assert.strictEqual(headers[':status'], 200);
@@ -370,7 +370,7 @@ assert.strictEqual(getAuthority({
'age', '10',
'age', '20',
'x-multi', 'first',
- 'x-multi', 'second'
+ 'x-multi', 'second',
];
const headers = toHeaderObject(rawHeaders);
assert.strictEqual(headers[':status'], 200);
diff --git a/test/parallel/test-http2-window-size.js b/test/parallel/test-http2-window-size.js
index adf4534d5bc92b..b5940f29583a77 100644
--- a/test/parallel/test-http2-window-size.js
+++ b/test/parallel/test-http2-window-size.js
@@ -89,7 +89,7 @@ const initialWindowSizeList = [
(1 << 8) - 1,
1 << 8,
1 << 17,
- undefined // Use default window size which is (1 << 16) - 1
+ undefined, // Use default window size which is (1 << 16) - 1
];
// Call `run` on each element in the cartesian product of buffersList and
diff --git a/test/parallel/test-https-agent-session-reuse.js b/test/parallel/test-https-agent-session-reuse.js
index 0717a3f8165d67..485f4b1ca308c9 100644
--- a/test/parallel/test-https-agent-session-reuse.js
+++ b/test/parallel/test-https-agent-session-reuse.js
@@ -90,7 +90,7 @@ const server = https.createServer(options, function(req, res) {
servername: 'agent1',
ca: ca,
port: this.address().port
- }
+ },
];
function request() {
diff --git a/test/parallel/test-https-max-headers-count.js b/test/parallel/test-https-max-headers-count.js
index 12aaaa9cd3ad84..f8e4e64bfb94dd 100644
--- a/test/parallel/test-https-max-headers-count.js
+++ b/test/parallel/test-https-max-headers-count.js
@@ -25,7 +25,7 @@ for (let i = 0; i < N; ++i) {
const maxAndExpected = [ // for server
[50, 50],
[1500, 102],
- [0, N + 2] // Host and Connection
+ [0, N + 2], // Host and Connection
];
let max = maxAndExpected[requests][0];
let expected = maxAndExpected[requests][1];
@@ -46,7 +46,7 @@ server.listen(0, common.mustCall(() => {
const maxAndExpected = [ // for client
[20, 20],
[1200, 103],
- [0, N + 3] // Connection, Date and Transfer-Encoding
+ [0, N + 3], // Connection, Date and Transfer-Encoding
];
const doRequest = common.mustCall(() => {
const max = maxAndExpected[responses][0];
diff --git a/test/parallel/test-https-options-boolean-check.js b/test/parallel/test-https-options-boolean-check.js
index 65a17f9f7605b0..9740704e169f1e 100644
--- a/test/parallel/test-https-options-boolean-check.js
+++ b/test/parallel/test-https-options-boolean-check.js
@@ -61,7 +61,7 @@ const caArrDataView = toDataView(caCert);
[[keyStr, keyStr2], false],
[false, [certStr, certStr2]],
[[{ pem: keyBuff }], false],
- [[{ pem: keyBuff }, { pem: keyBuff }], false]
+ [[{ pem: keyBuff }, { pem: keyBuff }], false],
].forEach(([key, cert]) => {
https.createServer({ key, cert });
});
@@ -80,7 +80,7 @@ const caArrDataView = toDataView(caCert);
[[keyBuff, true], [certBuff, certBuff2], 1],
[[true, keyStr2], [certStr, certStr2], 0],
[[true, false], [certBuff, certBuff2], 0],
- [true, [certBuff, certBuff2]]
+ [true, [certBuff, certBuff2]],
].forEach(([key, cert, index]) => {
const val = index === undefined ? key : key[index];
assert.throws(() => {
@@ -141,7 +141,7 @@ const caArrDataView = toDataView(caCert);
[keyBuff, certBuff, {}],
[keyBuff, certBuff, 1],
[keyBuff, certBuff, true],
- [keyBuff, certBuff, [caCert, true], 1]
+ [keyBuff, certBuff, [caCert, true], 1],
].forEach(([key, cert, ca, index]) => {
const val = index === undefined ? ca : ca[index];
assert.throws(() => {
diff --git a/test/parallel/test-inspect-async-hook-setup-at-inspect.js b/test/parallel/test-inspect-async-hook-setup-at-inspect.js
index b68617b5d52276..2c755582852a01 100644
--- a/test/parallel/test-inspect-async-hook-setup-at-inspect.js
+++ b/test/parallel/test-inspect-async-hook-setup-at-inspect.js
@@ -30,7 +30,7 @@ async function setupTimeoutForStackTrace(session) {
await session.send([
{ 'method': 'Runtime.evaluate',
'params': { expression: 'setupTimeoutWithBreak()' } },
- { 'method': 'Debugger.resume' }
+ { 'method': 'Debugger.resume' },
]);
}
@@ -54,7 +54,7 @@ async function runTests() {
'params': { 'maxDepth': 10 } },
{ 'method': 'Debugger.setBlackboxPatterns',
'params': { 'patterns': [] } },
- { 'method': 'Runtime.runIfWaitingForDebugger' }
+ { 'method': 'Runtime.runIfWaitingForDebugger' },
]);
await waitForInitialSetup(session);
diff --git a/test/parallel/test-inspect-publish-uid.js b/test/parallel/test-inspect-publish-uid.js
index 2479a37a2d6901..32550ddb66983a 100644
--- a/test/parallel/test-inspect-publish-uid.js
+++ b/test/parallel/test-inspect-publish-uid.js
@@ -20,7 +20,7 @@ async function testArg(argValue) {
const nodeProcess = spawnSync(process.execPath, [
'--inspect=0',
`--inspect-publish-uid=${argValue}`,
- '-e', `(${scriptMain.toString()})(${hasHttp ? 200 : 404})`
+ '-e', `(${scriptMain.toString()})(${hasHttp ? 200 : 404})`,
]);
const hasWebSocketInStderr = checkStdError(
nodeProcess.stderr.toString('utf8'));
diff --git a/test/parallel/test-inspector-connect-main-thread.js b/test/parallel/test-inspector-connect-main-thread.js
index be34981cd0c5be..86ff6866bc064e 100644
--- a/test/parallel/test-inspector-connect-main-thread.js
+++ b/test/parallel/test-inspector-connect-main-thread.js
@@ -111,7 +111,7 @@ async function main() {
'Runtime.enable',
'Debugger.setBreakpointByUrl',
'Debugger.evaluateOnCallFrame',
- 'Debugger.resume'
+ 'Debugger.resume',
]);
}
diff --git a/test/parallel/test-inspector-esm.js b/test/parallel/test-inspector-esm.js
index da3bd17e33f4bc..590432ad9ac31d 100644
--- a/test/parallel/test-inspector-esm.js
+++ b/test/parallel/test-inspector-esm.js
@@ -33,7 +33,7 @@ async function testBreakpointOnStart(session) {
'params': { 'interval': 100 } },
{ 'method': 'Debugger.setBlackboxPatterns',
'params': { 'patterns': [] } },
- { 'method': 'Runtime.runIfWaitingForDebugger' }
+ { 'method': 'Runtime.runIfWaitingForDebugger' },
];
await session.send(commands);
diff --git a/test/parallel/test-inspector-multisession-ws.js b/test/parallel/test-inspector-multisession-ws.js
index 7981eef0d30149..1caae767ec55c3 100644
--- a/test/parallel/test-inspector-multisession-ws.js
+++ b/test/parallel/test-inspector-multisession-ws.js
@@ -37,7 +37,7 @@ async function setupSession(node) {
'params': { 'interval': 100 } },
{ 'method': 'Debugger.setBlackboxPatterns',
'params': { 'patterns': [] } },
- { 'method': 'Runtime.runIfWaitingForDebugger' }
+ { 'method': 'Runtime.runIfWaitingForDebugger' },
]);
return session;
}
@@ -56,7 +56,7 @@ async function testSuspend(sessionA, sessionB) {
sessionA.send({ 'method': 'Debugger.pause' });
return Promise.all([
sessionA.waitForNotification('Debugger.paused', 'SessionA paused'),
- sessionB.waitForNotification('Debugger.paused', 'SessionB paused')
+ sessionB.waitForNotification('Debugger.paused', 'SessionB paused'),
]);
}
diff --git a/test/parallel/test-internal-module-require.js b/test/parallel/test-internal-module-require.js
index 5b20a83393669f..c6e2057d3da1ee 100644
--- a/test/parallel/test-internal-module-require.js
+++ b/test/parallel/test-internal-module-require.js
@@ -70,7 +70,7 @@ const expectedPublicModules = new Set([
'v8',
'vm',
'worker_threads',
- 'zlib'
+ 'zlib',
]);
if (process.argv[2] === 'child') {
diff --git a/test/parallel/test-internal-util-decorate-error-stack.js b/test/parallel/test-internal-util-decorate-error-stack.js
index b12d50bee79abc..b125a29741cb73 100644
--- a/test/parallel/test-internal-util-decorate-error-stack.js
+++ b/test/parallel/test-internal-util-decorate-error-stack.js
@@ -56,7 +56,7 @@ checkStack(err.stack);
// Verify that the stack is only decorated once for uncaught exceptions.
const args = [
'-e',
- `require('${badSyntaxPath}')`
+ `require('${badSyntaxPath}')`,
];
const result = spawnSync(process.argv[0], args, { encoding: 'utf8' });
checkStack(result.stderr);
diff --git a/test/parallel/test-internal-util-normalizeencoding.js b/test/parallel/test-internal-util-normalizeencoding.js
index af567cbcf5cab3..167880d661ff4c 100644
--- a/test/parallel/test-internal-util-normalizeencoding.js
+++ b/test/parallel/test-internal-util-normalizeencoding.js
@@ -46,7 +46,7 @@ const tests = [
[NaN, undefined],
[0, undefined],
[[], undefined],
- [{}, undefined]
+ [{}, undefined],
];
tests.forEach((e, i) => {
diff --git a/test/parallel/test-internal-validators-validateport.js b/test/parallel/test-internal-validators-validateport.js
index ea9c3a7b58b692..a4c92b8dbca929 100644
--- a/test/parallel/test-internal-validators-validateport.js
+++ b/test/parallel/test-internal-validators-validateport.js
@@ -17,7 +17,7 @@ for (let n = 0; n <= 0xFFFF; n++) {
-1, 'a', {}, [], false, true,
0xFFFF + 1, Infinity, -Infinity, NaN,
undefined, null, '', ' ', 1.1, '0x',
- '-0x1', '-0o1', '-0b1', '0o', '0b'
+ '-0x1', '-0o1', '-0b1', '0o', '0b',
].forEach((i) => assert.throws(() => validatePort(i), {
code: 'ERR_SOCKET_BAD_PORT'
}));
diff --git a/test/parallel/test-kill-segfault-freebsd.js b/test/parallel/test-kill-segfault-freebsd.js
index 8532f11c86b804..e17b00741bd9aa 100644
--- a/test/parallel/test-kill-segfault-freebsd.js
+++ b/test/parallel/test-kill-segfault-freebsd.js
@@ -11,7 +11,7 @@ const child_process = require('child_process');
// NOTE: Was crashing on FreeBSD
const cp = child_process.spawn(process.execPath, [
'-e',
- 'process.kill(process.pid, "SIGINT")'
+ 'process.kill(process.pid, "SIGINT")',
]);
cp.on('exit', function(code) {
diff --git a/test/parallel/test-macos-app-sandbox.js b/test/parallel/test-macos-app-sandbox.js
index 53484834a36758..396a35cd72c719 100644
--- a/test/parallel/test-macos-app-sandbox.js
+++ b/test/parallel/test-macos-app-sandbox.js
@@ -43,14 +43,14 @@ assert.strictEqual(
'--entitlements', fixtures.path(
'macos-app-sandbox', 'node_sandboxed.entitlements'),
'--force', '-s', '-',
- appBundlePath
+ appBundlePath,
]).status,
0);
// Sandboxed app shouldn't be able to read the home dir
assert.notStrictEqual(
child_process.spawnSync(appExecutablePath, [
- '-e', 'fs.readdirSync(process.argv[1])', os.homedir()
+ '-e', 'fs.readdirSync(process.argv[1])', os.homedir(),
]).status,
0);
diff --git a/test/parallel/test-microtask-queue-integration.js b/test/parallel/test-microtask-queue-integration.js
index 57c384f8ba8177..69d55253a25295 100644
--- a/test/parallel/test-microtask-queue-integration.js
+++ b/test/parallel/test-microtask-queue-integration.js
@@ -26,7 +26,7 @@ const assert = require('assert');
const implementations = [
function(fn) {
Promise.resolve().then(fn);
- }
+ },
];
let expected = 0;
diff --git a/test/parallel/test-module-circular-dependency-warning.js b/test/parallel/test-module-circular-dependency-warning.js
index 6e2924c45eefff..35ec16762b89e4 100644
--- a/test/parallel/test-module-circular-dependency-warning.js
+++ b/test/parallel/test-module-circular-dependency-warning.js
@@ -11,7 +11,7 @@ common.expectWarning({
["Accessing non-existent property 'Symbol(someSymbol)' " +
'of module exports inside circular dependency'],
["Accessing non-existent property 'missingPropModuleExportsB' " +
- 'of module exports inside circular dependency']
+ 'of module exports inside circular dependency'],
]
});
const required = require(fixtures.path('cycles', 'warning-a.js'));
diff --git a/test/parallel/test-module-nodemodulepaths.js b/test/parallel/test-module-nodemodulepaths.js
index c79d2e6e72c64c..1e355882e0f3d7 100644
--- a/test/parallel/test-module-nodemodulepaths.js
+++ b/test/parallel/test-module-nodemodulepaths.js
@@ -39,7 +39,7 @@ const cases = {
'C:\\Users\\hefangshi\\AppData\\node_modules',
'C:\\Users\\hefangshi\\node_modules',
'C:\\Users\\node_modules',
- 'C:\\node_modules'
+ 'C:\\node_modules',
]
}, {
file: 'C:\\Users\\Rocko Artischocko\\node_stuff\\foo',
@@ -48,7 +48,7 @@ const cases = {
'C:\\Users\\Rocko Artischocko\\node_stuff\\node_modules',
'C:\\Users\\Rocko Artischocko\\node_modules',
'C:\\Users\\node_modules',
- 'C:\\node_modules'
+ 'C:\\node_modules',
]
}, {
file: 'C:\\Users\\Rocko Artischocko\\node_stuff\\foo_node_modules',
@@ -58,17 +58,17 @@ Artischocko\\node_stuff\\foo_node_modules\\node_modules',
'C:\\Users\\Rocko Artischocko\\node_stuff\\node_modules',
'C:\\Users\\Rocko Artischocko\\node_modules',
'C:\\Users\\node_modules',
- 'C:\\node_modules'
+ 'C:\\node_modules',
]
}, {
file: 'C:\\node_modules',
expect: [
- 'C:\\node_modules'
+ 'C:\\node_modules',
]
}, {
file: 'C:\\',
expect: [
- 'C:\\node_modules'
+ 'C:\\node_modules',
]
}],
'POSIX': [{
@@ -83,7 +83,7 @@ node-gyp/node_modules/glob/node_modules',
'/usr/lib/node_modules/npm/node_modules',
'/usr/lib/node_modules',
'/usr/node_modules',
- '/node_modules'
+ '/node_modules',
]
}, {
file: '/usr/test/lib/node_modules/npm/foo',
@@ -93,7 +93,7 @@ node-gyp/node_modules/glob/node_modules',
'/usr/test/lib/node_modules',
'/usr/test/node_modules',
'/usr/node_modules',
- '/node_modules'
+ '/node_modules',
]
}, {
file: '/usr/test/lib/node_modules/npm/foo_node_modules',
@@ -103,17 +103,17 @@ node-gyp/node_modules/glob/node_modules',
'/usr/test/lib/node_modules',
'/usr/test/node_modules',
'/usr/node_modules',
- '/node_modules'
+ '/node_modules',
]
}, {
file: '/node_modules',
expect: [
- '/node_modules'
+ '/node_modules',
]
}, {
file: '/',
expect: [
- '/node_modules'
+ '/node_modules',
]
}]
};
diff --git a/test/parallel/test-net-connect-options-fd.js b/test/parallel/test-net-connect-options-fd.js
index 62e1414421404a..e9b35c0bfeadf4 100644
--- a/test/parallel/test-net-connect-options-fd.js
+++ b/test/parallel/test-net-connect-options-fd.js
@@ -25,7 +25,7 @@ function testClients(getSocketOpt, getConnectOpt, getConnectCb) {
.on('connect', getConnectCb(3)),
new net.Socket(getSocketOpt(4)).connect(getConnectOpt(4), getConnectCb(4)),
new net.Socket(getSocketOpt(5)).connect(getConnectOpt(5))
- .on('connect', getConnectCb(5))
+ .on('connect', getConnectCb(5)),
];
}
diff --git a/test/parallel/test-net-connect-options-port.js b/test/parallel/test-net-connect-options-port.js
index 74e78240abb5ba..d9f310afc7549e 100644
--- a/test/parallel/test-net-connect-options-port.js
+++ b/test/parallel/test-net-connect-options-port.js
@@ -128,7 +128,7 @@ function doConnect(args, getCb) {
return socket.connect.apply(socket, args)
.on('connect', getCb())
.resume();
- }
+ },
];
}
diff --git a/test/parallel/test-net-isipv4.js b/test/parallel/test-net-isipv4.js
index ec04505cedb27f..8f5c30569ce988 100644
--- a/test/parallel/test-net-isipv4.js
+++ b/test/parallel/test-net-isipv4.js
@@ -19,7 +19,7 @@ const v4 = [
'192.0.2.235',
'99.198.122.146',
'46.51.197.88',
- '173.194.34.134'
+ '173.194.34.134',
];
const v4not = [
@@ -34,7 +34,7 @@ const v4not = [
'1000.2.3.4',
'999.2.3.4',
'0000000192.168.0.200',
- '192.168.0.2000000000'
+ '192.168.0.2000000000',
];
v4.forEach((ip) => {
diff --git a/test/parallel/test-net-isipv6.js b/test/parallel/test-net-isipv6.js
index 7ba379c3bdd27e..855f17a076c697 100644
--- a/test/parallel/test-net-isipv6.js
+++ b/test/parallel/test-net-isipv6.js
@@ -131,7 +131,7 @@ const v6 = [
'a:0:0:0:a:0:0:0',
'a:0:0:0:0:0:0:0',
'fe80::7:8%eth0',
- 'fe80::7:8%1'
+ 'fe80::7:8%1',
];
const v6not = [
@@ -232,7 +232,7 @@ const v6not = [
'::ffff:257.1.2.3',
'::ffff:12345678901234567890.1.26',
'2001:0000:1234:0000:0000:C1C0:ABCD:0876 0',
- '02001:0000:1234:0000:0000:C1C0:ABCD:0876'
+ '02001:0000:1234:0000:0000:C1C0:ABCD:0876',
];
v6.forEach((ip) => {
diff --git a/test/parallel/test-net-server-listen-options.js b/test/parallel/test-net-server-listen-options.js
index 336485a3cb8f55..7e306af8ab082f 100644
--- a/test/parallel/test-net-server-listen-options.js
+++ b/test/parallel/test-net-server-listen-options.js
@@ -20,7 +20,7 @@ function close() { this.close(); }
// Test listen(port, cb) and listen({ port }, cb) combinations
const listenOnPort = [
(port, cb) => net.createServer().listen({ port }, cb),
- (port, cb) => net.createServer().listen(port, cb)
+ (port, cb) => net.createServer().listen(port, cb),
];
{
diff --git a/test/parallel/test-net-socket-timeout.js b/test/parallel/test-net-socket-timeout.js
index e01304afe53f01..209359fda60810 100644
--- a/test/parallel/test-net-socket-timeout.js
+++ b/test/parallel/test-net-socket-timeout.js
@@ -28,12 +28,12 @@ const { inspect } = require('util');
// Verify that invalid delays throw
const s = new net.Socket();
const nonNumericDelays = [
- '100', true, false, undefined, null, '', {}, () => {}, []
+ '100', true, false, undefined, null, '', {}, () => {}, [],
];
const badRangeDelays = [-0.001, -1, -Infinity, Infinity, NaN];
const validDelays = [0, 0.001, 1, 1e6];
const invalidCallbacks = [
- 1, '100', true, false, null, {}, [], Symbol('test')
+ 1, '100', true, false, null, {}, [], Symbol('test'),
];
diff --git a/test/parallel/test-net-write-arguments.js b/test/parallel/test-net-write-arguments.js
index 54958847435349..289c3c0f36bcf3 100644
--- a/test/parallel/test-net-write-arguments.js
+++ b/test/parallel/test-net-write-arguments.js
@@ -23,7 +23,7 @@ assert.throws(() => {
+Infinity,
-Infinity,
[],
- {}
+ {},
].forEach((value) => {
const socket = net.Stream({ highWaterMark: 0 });
// We need to check the callback since 'error' will only
diff --git a/test/parallel/test-os-process-priority.js b/test/parallel/test-os-process-priority.js
index d9adac58bf981e..c6fdbff9e554d9 100644
--- a/test/parallel/test-os-process-priority.js
+++ b/test/parallel/test-os-process-priority.js
@@ -73,7 +73,7 @@ assert.strictEqual(typeof PRIORITY_HIGHEST, 'number');
3.14,
2 ** 32,
PRIORITY_HIGHEST - 1,
- PRIORITY_LOW + 1
+ PRIORITY_LOW + 1,
].forEach((priority) => {
assert.throws(() => {
os.setPriority(0, priority);
diff --git a/test/parallel/test-path-join.js b/test/parallel/test-path-join.js
index 6243d97ce8a8bc..d6d18399960d0b 100644
--- a/test/parallel/test-path-join.js
+++ b/test/parallel/test-path-join.js
@@ -55,9 +55,9 @@ const joinTests = [
[['/', '//foo'], '/foo'],
[['/', '', '/foo'], '/foo'],
[['', '/', 'foo'], '/foo'],
- [['', '/', '/foo'], '/foo']
- ]
- ]
+ [['', '/', '/foo'], '/foo'],
+ ],
+ ],
];
// Windows-specific join tests
@@ -109,9 +109,9 @@ joinTests.push([
[['c:.', '/'], 'c:.\\'],
[['c:.', 'file'], 'c:file'],
[['c:', '/'], 'c:\\'],
- [['c:', 'file'], 'c:\\file']
+ [['c:', 'file'], 'c:\\file'],
]
- )
+ ),
]);
joinTests.forEach((test) => {
if (!Array.isArray(test[0]))
diff --git a/test/parallel/test-path-parse-format.js b/test/parallel/test-path-parse-format.js
index cd1e84eae05790..e60a0cedae4259 100644
--- a/test/parallel/test-path-parse-format.js
+++ b/test/parallel/test-path-parse-format.js
@@ -47,7 +47,7 @@ const winPaths = [
['\\\\server two\\shared folder\\file path.zip',
'\\\\server two\\shared folder\\'],
['\\\\teela\\admin$\\system32', '\\\\teela\\admin$\\'],
- ['\\\\?\\UNC\\server\\share', '\\\\?\\UNC\\']
+ ['\\\\?\\UNC\\server\\share', '\\\\?\\UNC\\'],
];
const winSpecialCaseParseTests = [
@@ -62,7 +62,7 @@ const winSpecialCaseFormatTests = [
[{ name: 'index', ext: '.html' }, 'index.html'],
[{ dir: 'some\\dir', name: 'index', ext: '.html' }, 'some\\dir\\index.html'],
[{ root: 'C:\\', name: 'index', ext: '.html' }, 'C:\\index.html'],
- [{}, '']
+ [{}, ''],
];
const unixPaths = [
@@ -86,7 +86,7 @@ const unixPaths = [
['/.', '/'],
['/.foo', '/'],
['/.foo.bar', '/'],
- ['/foo/bar.baz', '/']
+ ['/foo/bar.baz', '/'],
];
const unixSpecialCaseFormatTests = [
@@ -96,7 +96,7 @@ const unixSpecialCaseFormatTests = [
[{ name: 'index', ext: '.html' }, 'index.html'],
[{ dir: 'some/dir', name: 'index', ext: '.html' }, 'some/dir/index.html'],
[{ root: '/', name: 'index', ext: '.html' }, '/index.html'],
- [{}, '']
+ [{}, ''],
];
const errors = [
@@ -132,9 +132,9 @@ const trailingTests = [
dir: 'D:\\foo\\\\',
base: 'bar.baz',
ext: '.baz',
- name: 'bar' }
- ]
- ]
+ name: 'bar' },
+ ],
+ ],
],
[ path.posix.parse,
[['./', { root: '', dir: '', base: '.', ext: '', name: '.' }],
@@ -142,10 +142,10 @@ const trailingTests = [
['///', { root: '/', dir: '/', base: '', ext: '', name: '' }],
['/foo///', { root: '/', dir: '/', base: 'foo', ext: '', name: 'foo' }],
['/foo///bar.baz',
- { root: '/', dir: '/foo//', base: 'bar.baz', ext: '.baz', name: 'bar' }
- ]
- ]
- ]
+ { root: '/', dir: '/foo//', base: 'bar.baz', ext: '.baz', name: 'bar' },
+ ],
+ ],
+ ],
];
const failures = [];
trailingTests.forEach((test) => {
diff --git a/test/parallel/test-path-relative.js b/test/parallel/test-path-relative.js
index 72f862b6df764e..f6a9f5662a6c24 100644
--- a/test/parallel/test-path-relative.js
+++ b/test/parallel/test-path-relative.js
@@ -31,8 +31,8 @@ const relativeTests = [
['\\\\foo\\baz-quux', '\\\\foo\\baz', '..\\baz'],
['\\\\foo\\baz', '\\\\foo\\baz-quux', '..\\baz-quux'],
['C:\\baz', '\\\\foo\\bar\\baz', '\\\\foo\\bar\\baz'],
- ['\\\\foo\\bar\\baz', 'C:\\baz', 'C:\\baz']
- ]
+ ['\\\\foo\\bar\\baz', 'C:\\baz', 'C:\\baz'],
+ ],
],
[ path.posix.relative,
// Arguments result
@@ -48,9 +48,9 @@ const relativeTests = [
['/foo/bar/baz', '/foo/bar/baz-quux', '../baz-quux'],
['/baz-quux', '/baz', '../baz'],
['/baz', '/baz-quux', '../baz-quux'],
- ['/page1/page2/foo', '/', '../../..']
- ]
- ]
+ ['/page1/page2/foo', '/', '../../..'],
+ ],
+ ],
];
relativeTests.forEach((test) => {
const relative = test[0];
diff --git a/test/parallel/test-path-resolve.js b/test/parallel/test-path-resolve.js
index ed3c7c4c5a0113..8bf8001ea2f0f2 100644
--- a/test/parallel/test-path-resolve.js
+++ b/test/parallel/test-path-resolve.js
@@ -24,8 +24,8 @@ const resolveTests = [
[['c:/', '//server//share'], '\\\\server\\share\\'],
[['c:/', '///some//dir'], 'c:\\some\\dir'],
[['C:\\foo\\tmp.3\\', '..\\tmp.3\\cycles\\root.js'],
- 'C:\\foo\\tmp.3\\cycles\\root.js']
- ]
+ 'C:\\foo\\tmp.3\\cycles\\root.js'],
+ ],
],
[ path.posix.resolve,
// Arguments result
@@ -34,9 +34,9 @@ const resolveTests = [
[['a/b/c/', '../../..'], process.cwd()],
[['.'], process.cwd()],
[['/some/dir', '.', '/absolute/'], '/absolute'],
- [['/foo/tmp.3/', '../tmp.3/cycles/root.js'], '/foo/tmp.3/cycles/root.js']
- ]
- ]
+ [['/foo/tmp.3/', '../tmp.3/cycles/root.js'], '/foo/tmp.3/cycles/root.js'],
+ ],
+ ],
];
resolveTests.forEach((test) => {
const resolve = test[0];
diff --git a/test/parallel/test-performance-gc.js b/test/parallel/test-performance-gc.js
index 2a489fb67935f4..1561bc5fb78572 100644
--- a/test/parallel/test-performance-gc.js
+++ b/test/parallel/test-performance-gc.js
@@ -20,7 +20,7 @@ const kinds = [
NODE_PERFORMANCE_GC_MAJOR,
NODE_PERFORMANCE_GC_MINOR,
NODE_PERFORMANCE_GC_INCREMENTAL,
- NODE_PERFORMANCE_GC_WEAKCB
+ NODE_PERFORMANCE_GC_WEAKCB,
];
// Adding an observer should force at least one gc to appear
diff --git a/test/parallel/test-policy-parse-integrity.js b/test/parallel/test-policy-parse-integrity.js
index 3a31d0d57f25db..7c48eeb01426c8 100644
--- a/test/parallel/test-policy-parse-integrity.js
+++ b/test/parallel/test-policy-parse-integrity.js
@@ -67,7 +67,7 @@ function test({ shouldFail, integrity, manifest = {} }) {
const { status } = spawnSync(process.execPath, [
'--experimental-policy',
policyFilepath,
- depFilepath
+ depFilepath,
]);
if (shouldFail) {
assert.notStrictEqual(status, 0);
diff --git a/test/parallel/test-policy-scopes-dependencies.js b/test/parallel/test-policy-scopes-dependencies.js
index a5a9302ac69629..53c44886146bfe 100644
--- a/test/parallel/test-policy-scopes-dependencies.js
+++ b/test/parallel/test-policy-scopes-dependencies.js
@@ -19,7 +19,7 @@ const assert = require('assert');
'file:///root/dir1',
'file:///root/dir1/',
'file:///root/dir1/dir2',
- 'file:///root/dir1/dir2/'
+ 'file:///root/dir1/dir2/',
];
{
diff --git a/test/parallel/test-policy-scopes-integrity.js b/test/parallel/test-policy-scopes-integrity.js
index 8c91cea142b903..16d9eb04eb7347 100644
--- a/test/parallel/test-policy-scopes-integrity.js
+++ b/test/parallel/test-policy-scopes-integrity.js
@@ -19,7 +19,7 @@ const assert = require('assert');
'file:///root/dir1',
'file:///root/dir1/',
'file:///root/dir1/dir2',
- 'file:///root/dir1/dir2/'
+ 'file:///root/dir1/dir2/',
];
{
diff --git a/test/parallel/test-preload.js b/test/parallel/test-preload.js
index df83d74e23bbb5..4636a46007001c 100644
--- a/test/parallel/test-preload.js
+++ b/test/parallel/test-preload.js
@@ -135,7 +135,7 @@ replProc.on('close', function(code) {
assert.strictEqual(code, 0);
const output = [
'A',
- '> '
+ '> ',
];
assert.ok(replStdout.startsWith(output[0]));
assert.ok(replStdout.endsWith(output[1]));
diff --git a/test/parallel/test-process-cpuUsage.js b/test/parallel/test-process-cpuUsage.js
index ecff499fd7e037..f1580d5f092b72 100644
--- a/test/parallel/test-process-cpuUsage.js
+++ b/test/parallel/test-process-cpuUsage.js
@@ -62,7 +62,7 @@ assert.throws(
[
{ user: 3, system: 'b' },
- { user: 3, system: null }
+ { user: 3, system: null },
].forEach((value) => {
assert.throws(
() => process.cpuUsage(value),
@@ -78,7 +78,7 @@ assert.throws(
// Check invalid values.
[
{ user: -1, system: 2 },
- { user: Number.POSITIVE_INFINITY, system: 4 }
+ { user: Number.POSITIVE_INFINITY, system: 4 },
].forEach((value) => {
assert.throws(
() => process.cpuUsage(value),
@@ -93,7 +93,7 @@ assert.throws(
[
{ user: 3, system: -2 },
- { user: 5, system: Number.NEGATIVE_INFINITY }
+ { user: 5, system: Number.NEGATIVE_INFINITY },
].forEach((value) => {
assert.throws(
() => process.cpuUsage(value),
diff --git a/test/parallel/test-process-emit-warning-from-native.js b/test/parallel/test-process-emit-warning-from-native.js
index ee7e731935dc9d..80b1e71a08c58e 100644
--- a/test/parallel/test-process-emit-warning-from-native.js
+++ b/test/parallel/test-process-emit-warning-from-native.js
@@ -13,10 +13,10 @@ const key = '0123456789';
{
common.expectWarning({
DeprecationWarning: [
- ['crypto.createCipher is deprecated.', 'DEP0106']
+ ['crypto.createCipher is deprecated.', 'DEP0106'],
],
Warning: [
- ['Use Cipheriv for counter mode of aes-256-gcm']
+ ['Use Cipheriv for counter mode of aes-256-gcm'],
]
});
diff --git a/test/parallel/test-process-emitwarning.js b/test/parallel/test-process-emitwarning.js
index de0861140d6135..1bfac40ecbce30 100644
--- a/test/parallel/test-process-emitwarning.js
+++ b/test/parallel/test-process-emitwarning.js
@@ -42,7 +42,7 @@ class CustomWarning extends Error {
[testMsg, { type: testType, code: testCode, detail: true }],
[testMsg, { type: testType, code: testCode, detail: [] }],
[testMsg, { type: testType, code: testCode, detail: null }],
- [testMsg, { type: testType, code: testCode, detail: 1 }]
+ [testMsg, { type: testType, code: testCode, detail: 1 }],
].forEach((args) => {
process.emitWarning(...args);
});
@@ -72,7 +72,7 @@ process.emitWarning(warningThrowToString);
['', '', []],
[],
[undefined, 'foo', 'bar'],
- [undefined]
+ [undefined],
].forEach((args) => {
assert.throws(
() => process.emitWarning(...args),
diff --git a/test/parallel/test-process-env-allowed-flags.js b/test/parallel/test-process-env-allowed-flags.js
index 66be07b8b872c2..1d50e02d7abe0c 100644
--- a/test/parallel/test-process-env-allowed-flags.js
+++ b/test/parallel/test-process-env-allowed-flags.js
@@ -28,7 +28,7 @@ const assert = require('assert');
'--r',
'-R',
'---inspect-brk',
- '--cheeseburgers'
+ '--cheeseburgers',
];
goodFlags.forEach((flag) => {
diff --git a/test/parallel/test-process-versions.js b/test/parallel/test-process-versions.js
index 464a8a4ecec58a..56e3dc67e6a81c 100644
--- a/test/parallel/test-process-versions.js
+++ b/test/parallel/test-process-versions.js
@@ -12,7 +12,7 @@ const expected_keys = [
'zlib',
'nghttp2',
'napi',
- 'llhttp'
+ 'llhttp',
];
if (common.hasCrypto) {
diff --git a/test/parallel/test-process-wrap.js b/test/parallel/test-process-wrap.js
index ef9075e9158229..997e3e43908010 100644
--- a/test/parallel/test-process-wrap.js
+++ b/test/parallel/test-process-wrap.js
@@ -60,7 +60,7 @@ p.spawn({
stdio: [
{ type: 'ignore' },
{ type: 'pipe', handle: pipe },
- { type: 'ignore' }
+ { type: 'ignore' },
]
});
@@ -74,7 +74,7 @@ assert.throws(function() {
stdio: [
{ type: 'ignore' },
{ type: 'pipe', handle: pipe },
- { type: 'ignore' }
+ { type: 'ignore' },
]
});
}, TypeError);
diff --git a/test/parallel/test-promise-swallowed-event.js b/test/parallel/test-promise-swallowed-event.js
index 144d732c20668b..e9b97ab19d329d 100644
--- a/test/parallel/test-promise-swallowed-event.js
+++ b/test/parallel/test-promise-swallowed-event.js
@@ -38,7 +38,7 @@ const expected = [
swallowedResolve2,
'reject',
p2,
- rejection2
+ rejection2,
];
let count = 0;
diff --git a/test/parallel/test-promises-unhandled-symbol-rejections.js b/test/parallel/test-promises-unhandled-symbol-rejections.js
index cfcce5b148163d..00da8885f13d9a 100644
--- a/test/parallel/test-promises-unhandled-symbol-rejections.js
+++ b/test/parallel/test-promises-unhandled-symbol-rejections.js
@@ -18,7 +18,7 @@ const expectedPromiseWarning = ['Unhandled promise rejection. ' +
common.expectWarning({
UnhandledPromiseRejectionWarning: [
expectedValueWarning,
- expectedPromiseWarning
+ expectedPromiseWarning,
],
});
diff --git a/test/parallel/test-punycode.js b/test/parallel/test-punycode.js
index d7ad2ec21faa57..190c0b22b313dc 100644
--- a/test/parallel/test-punycode.js
+++ b/test/parallel/test-punycode.js
@@ -194,7 +194,7 @@ const tests = [
encoded: '-> $1.00 <--',
decoded: '\u002D\u003E\u0020\u0024\u0031\u002E\u0030\u0030\u0020\u003C' +
'\u002D'
- }
+ },
];
let errors = 0;
diff --git a/test/parallel/test-querystring.js b/test/parallel/test-querystring.js
index 7a001f6a029c42..105bcc56a9878e 100644
--- a/test/parallel/test-querystring.js
+++ b/test/parallel/test-querystring.js
@@ -107,7 +107,7 @@ const qsTestCases = [
['%20+&', '%20%20=', { ' ': '' }],
['=%20+&', '=%20%20', { '': ' ' }],
[null, '', {}],
- [undefined, '', {}]
+ [undefined, '', {}],
];
// [ wonkyQS, canonicalQS, obj ]
@@ -118,7 +118,7 @@ const qsColonTestCases = [
'foo:1%26bar%3A2;baz:quux',
{ 'foo': '1&bar:2', 'baz': 'quux' }],
['foo%3Abaz:bar', 'foo%3Abaz:bar', { 'foo:baz': 'bar' }],
- ['foo:baz:bar', 'foo:baz%3Abar', { 'foo': 'baz:bar' }]
+ ['foo:baz:bar', 'foo:baz%3Abar', { 'foo': 'baz:bar' }],
];
// [wonkyObj, qs, canonicalObj]
@@ -138,14 +138,14 @@ const qsWeirdObjects = [
[
{ f: new Boolean(false), t: new Boolean(true) },
'f=&t=',
- { 'f': '', 't': '' }
+ { 'f': '', 't': '' },
],
[{ f: false, t: true }, 'f=false&t=true', { 'f': 'false', 't': 'true' }],
[{ n: null }, 'n=', { 'n': '' }],
[{ nan: NaN }, 'nan=', { 'nan': '' }],
[{ inf: Infinity }, 'inf=', { 'inf': '' }],
[{ a: [], b: [] }, '', {}],
- [{ a: 1, b: [] }, 'a=1', { 'a': '1' }]
+ [{ a: 1, b: [] }, 'a=1', { 'a': '1' }],
];
// }}}
@@ -164,7 +164,7 @@ const qsNoMungeTestCases = [
['gragh=1&gragh=3&goo=2', { 'gragh': ['1', '3'], 'goo': '2' }],
['frappucino=muffin&goat%5B%5D=scone&pond=moose',
{ 'frappucino': 'muffin', 'goat[]': 'scone', 'pond': 'moose' }],
- ['trololol=yes&lololo=no', { 'trololol': 'yes', 'lololo': 'no' }]
+ ['trololol=yes&lololo=no', { 'trololol': 'yes', 'lololo': 'no' }],
];
const qsUnescapeTestCases = [
@@ -178,7 +178,7 @@ const qsUnescapeTestCases = [
' !"#$%&\'()*+,-./01234567'],
['%%2a', '%*'],
['%2sf%2a', '%2sf*'],
- ['%2%2af%2a', '%2*f*']
+ ['%2%2af%2a', '%2*f*'],
];
assert.strictEqual(qs.parse('id=918854443121279438895193').id,
@@ -232,13 +232,13 @@ qsNoMungeTestCases.forEach((testCase) => {
const f = qs.parse('a=b&q=x%3Dy%26y%3Dz');
check(f, createWithNoPrototype([
{ key: 'a', value: 'b' },
- { key: 'q', value: 'x=y&y=z' }
+ { key: 'q', value: 'x=y&y=z' },
]));
f.q = qs.parse(f.q);
const expectedInternal = createWithNoPrototype([
{ key: 'x', value: 'y' },
- { key: 'y', value: 'z' }
+ { key: 'y', value: 'z' },
]);
check(f.q, expectedInternal);
}
@@ -248,12 +248,12 @@ qsNoMungeTestCases.forEach((testCase) => {
const f = qs.parse('a:b;q:x%3Ay%3By%3Az', ';', ':');
check(f, createWithNoPrototype([
{ key: 'a', value: 'b' },
- { key: 'q', value: 'x:y;y:z' }
+ { key: 'q', value: 'x:y;y:z' },
]));
f.q = qs.parse(f.q, ';', ':');
const expectedInternal = createWithNoPrototype([
{ key: 'x', value: 'y' },
- { key: 'y', value: 'z' }
+ { key: 'y', value: 'z' },
]);
check(f.q, expectedInternal);
}
diff --git a/test/parallel/test-readable-from.js b/test/parallel/test-readable-from.js
index aca8f5548a7129..24dee0dce20050 100644
--- a/test/parallel/test-readable-from.js
+++ b/test/parallel/test-readable-from.js
@@ -48,7 +48,7 @@ async function toReadablePromises() {
const promises = [
Promise.resolve('a'),
Promise.resolve('b'),
- Promise.resolve('c')
+ Promise.resolve('c'),
];
const stream = Readable.from(promises);
diff --git a/test/parallel/test-readline-async-iterators-destroy.js b/test/parallel/test-readline-async-iterators-destroy.js
index 7c14a667062fec..8641b0a2acde75 100644
--- a/test/parallel/test-readline-async-iterators-destroy.js
+++ b/test/parallel/test-readline-async-iterators-destroy.js
@@ -17,7 +17,7 @@ const testContents = [
'\n',
'line 1',
'line 1\nline 2 南越国是前203年至前111年存在于岭南地区的一个国家\nline 3\ntrailing',
- 'line 1\nline 2\nline 3 ends with newline\n'
+ 'line 1\nline 2\nline 3 ends with newline\n',
];
async function testSimpleDestroy() {
diff --git a/test/parallel/test-readline-async-iterators.js b/test/parallel/test-readline-async-iterators.js
index c3883e4f369fde..671d6ae17cd165 100644
--- a/test/parallel/test-readline-async-iterators.js
+++ b/test/parallel/test-readline-async-iterators.js
@@ -16,7 +16,7 @@ const testContents = [
'\n',
'line 1',
'line 1\nline 2 南越国是前203年至前111年存在于岭南地区的一个国家\nline 3\ntrailing',
- 'line 1\nline 2\nline 3 ends with newline\n'
+ 'line 1\nline 2\nline 3 ends with newline\n',
];
async function testSimple() {
diff --git a/test/parallel/test-readline-emit-keypress-events.js b/test/parallel/test-readline-emit-keypress-events.js
index 3b9aece4654ac1..8bb10d905cae2a 100644
--- a/test/parallel/test-readline-emit-keypress-events.js
+++ b/test/parallel/test-readline-emit-keypress-events.js
@@ -24,5 +24,5 @@ assert.deepStrictEqual(sequence, ['f', 'o', 'o']);
assert.deepStrictEqual(keys, [
{ sequence: 'f', name: 'f', ctrl: false, meta: false, shift: false },
{ sequence: 'o', name: 'o', ctrl: false, meta: false, shift: false },
- { sequence: 'o', name: 'o', ctrl: false, meta: false, shift: false }
+ { sequence: 'o', name: 'o', ctrl: false, meta: false, shift: false },
]);
diff --git a/test/parallel/test-readline-interface-escapecodetimeout.js b/test/parallel/test-readline-interface-escapecodetimeout.js
index 11d518c0737e89..a0c0e77cb8da35 100644
--- a/test/parallel/test-readline-interface-escapecodetimeout.js
+++ b/test/parallel/test-readline-interface-escapecodetimeout.js
@@ -29,7 +29,7 @@ class FakeInput extends EventEmitter {
null,
{},
NaN,
- '50'
+ '50',
].forEach((invalidInput) => {
assert.throws(() => {
const fi = new FakeInput();
diff --git a/test/parallel/test-readline-interface.js b/test/parallel/test-readline-interface.js
index 8afe40efab4b2e..afa9fd33d22c4f 100644
--- a/test/parallel/test-readline-interface.js
+++ b/test/parallel/test-readline-interface.js
@@ -76,7 +76,7 @@ function assertCursorRowsAndCols(rli, rows, cols) {
50,
0,
100.5,
- 5000
+ 5000,
].forEach((crlfDelay) => {
const [rli] = getInterface({ crlfDelay });
assert.strictEqual(rli.crlfDelay, Math.max(crlfDelay || 100, 100));
@@ -536,7 +536,7 @@ function assertCursorRowsAndCols(rli, rows, cols) {
[
{ ctrl: true, name: 'w' },
{ ctrl: true, name: 'backspace' },
- { meta: true, name: 'backspace' }
+ { meta: true, name: 'backspace' },
].forEach((deleteWordLeftKey) => {
let [rli, fi] = getInterface({ terminal: true, prompt: '' });
fi.emit('data', 'the quick brown fox');
@@ -564,7 +564,7 @@ function assertCursorRowsAndCols(rli, rows, cols) {
[
{ ctrl: true, name: 'delete' },
{ meta: true, name: 'delete' },
- { meta: true, name: 'd' }
+ { meta: true, name: 'd' },
].forEach((deleteWordRightKey) => {
let [rli, fi] = getInterface({ terminal: true, prompt: '' });
fi.emit('data', 'the quick brown fox');
diff --git a/test/parallel/test-readline-keys.js b/test/parallel/test-readline-keys.js
index bdc93c148edbfe..8ae0d680d5f039 100644
--- a/test/parallel/test-readline-keys.js
+++ b/test/parallel/test-readline-keys.js
@@ -332,15 +332,15 @@ addTest('\x1bOa\x1bOb\x1bOc\x1bOd\x1bOe', [
const runKeyIntervalTests = [
// Escape character
addKeyIntervalTest('\x1b', [
- { name: 'escape', sequence: '\x1b', meta: true }
+ { name: 'escape', sequence: '\x1b', meta: true },
]),
// Chain of escape characters.
addKeyIntervalTest('\x1b\x1b\x1b\x1b'.split(''), [
{ name: 'escape', sequence: '\x1b', meta: true },
{ name: 'escape', sequence: '\x1b', meta: true },
{ name: 'escape', sequence: '\x1b', meta: true },
- { name: 'escape', sequence: '\x1b', meta: true }
- ])
+ { name: 'escape', sequence: '\x1b', meta: true },
+ ]),
].reverse().reduce((acc, fn) => fn(acc), () => {});
// Run key interval tests one after another.
diff --git a/test/parallel/test-readline-reopen.js b/test/parallel/test-readline-reopen.js
index dead22d81ac961..fd305fee3e88c7 100644
--- a/test/parallel/test-readline-reopen.js
+++ b/test/parallel/test-readline-reopen.js
@@ -23,7 +23,7 @@ rl1.on('line', common.mustCall(rl1OnLine));
// that it doesn’t get lost when closing the readline instance.
input.write(Buffer.concat([
Buffer.from('foo\n'),
- Buffer.from([ 0xe2 ]) // Exactly one third of a ☃ snowman.
+ Buffer.from([ 0xe2 ]), // Exactly one third of a ☃ snowman.
]));
function rl1OnLine(line) {
diff --git a/test/parallel/test-readline-tab-complete.js b/test/parallel/test-readline-tab-complete.js
index e8871863402cb1..7ccdef116492b7 100644
--- a/test/parallel/test-readline-tab-complete.js
+++ b/test/parallel/test-readline-tab-complete.js
@@ -15,7 +15,7 @@ common.skipIfDumbTerminal();
[
'あ',
'𐐷',
- '🐕'
+ '🐕',
].forEach((char) => {
[true, false].forEach((lineBreak) => {
const completer = (line) => [
@@ -24,7 +24,7 @@ common.skipIfDumbTerminal();
'',
`${char}${'a'.repeat(10)}`, `${char}${'b'.repeat(10)}`, char.repeat(11),
],
- line
+ line,
];
let output = '';
diff --git a/test/parallel/test-readline.js b/test/parallel/test-readline.js
index b336996cd2e53e..77799fc14cf75f 100644
--- a/test/parallel/test-readline.js
+++ b/test/parallel/test-readline.js
@@ -142,7 +142,7 @@ common.skipIfDumbTerminal();
'hop/zoo',
'/zoo',
'zoo',
- ''
+ '',
].forEach(function(expectedLine) {
rl.write.apply(rl, key.xterm.metad);
assert.strictEqual(rl.cursor, 0);
diff --git a/test/parallel/test-repl-domain.js b/test/parallel/test-repl-domain.js
index ce6da4bedb9e28..462677d114c13b 100644
--- a/test/parallel/test-repl-domain.js
+++ b/test/parallel/test-repl-domain.js
@@ -41,5 +41,5 @@ putIn.write = function(data) {
putIn.run([
'require("domain").create().on("error", function() { console.log("OK") })' +
- '.run(function() { throw new Error("threw") })'
+ '.run(function() { throw new Error("threw") })',
]);
diff --git a/test/parallel/test-repl-dynamic-import.js b/test/parallel/test-repl-dynamic-import.js
index 1f7a01575aa89b..a043e31bf5b2d0 100644
--- a/test/parallel/test-repl-dynamic-import.js
+++ b/test/parallel/test-repl-dynamic-import.js
@@ -4,7 +4,7 @@ const assert = require('assert');
const child_process = require('child_process');
const child = child_process.spawn(process.execPath, [
'--interactive',
- '--expose-gc'
+ '--expose-gc',
], {
stdio: 'pipe'
});
diff --git a/test/parallel/test-repl-editor.js b/test/parallel/test-repl-editor.js
index 783d303b3aaf16..e260f5e89174a8 100644
--- a/test/parallel/test-repl-editor.js
+++ b/test/parallel/test-repl-editor.js
@@ -71,7 +71,7 @@ const tests = [
output: '',
checkTerminalCodes: false,
event: null,
- }
+ },
];
tests.forEach(run);
@@ -121,7 +121,7 @@ const codeAlignmentTests = [
input: ' let i = 1;\n let j = 2\n',
cursor: 2,
line: ' '
- }
+ },
];
codeAlignmentTests.forEach(testCodeAlignment);
diff --git a/test/parallel/test-repl-envvars.js b/test/parallel/test-repl-envvars.js
index 4fab77b7c09980..96cc47dd1674f3 100644
--- a/test/parallel/test-repl-envvars.js
+++ b/test/parallel/test-repl-envvars.js
@@ -32,7 +32,7 @@ const tests = [
{
env: { NODE_NO_READLINE: '0' },
expected: { terminal: true, useColors: true }
- }
+ },
];
function run(test) {
diff --git a/test/parallel/test-repl-history-navigation.js b/test/parallel/test-repl-history-navigation.js
index 4dd9c350229b19..044c788a16af3f 100644
--- a/test/parallel/test-repl-history-navigation.js
+++ b/test/parallel/test-repl-history-navigation.js
@@ -116,7 +116,7 @@ const tests = [
'const foo = true', ENTER,
'555n + 111n', ENTER,
'5 + 5', ENTER,
- '55 - 13 === 42', ENTER
+ '55 - 13 === 42', ENTER,
],
expected: [],
clean: false
@@ -127,7 +127,7 @@ const tests = [
preview: false,
showEscapeCodes: true,
test: [
- '55', UP, UP, UP, UP, UP, UP, ENTER
+ '55', UP, UP, UP, UP, UP, UP, ENTER,
],
expected: [
'\x1B[1G', '\x1B[0J', prompt, '\x1B[3G',
@@ -150,7 +150,7 @@ const tests = [
'\r\n', '55\n',
'\x1B[1G', '\x1B[0J',
'> ', '\x1B[3G',
- '\r\n'
+ '\r\n',
],
clean: true
},
@@ -189,7 +189,7 @@ const tests = [
ENTER,
`${' '.repeat(236)} fun`,
ESCAPE,
- ENTER
+ ENTER,
],
expected: [],
clean: false
@@ -220,7 +220,7 @@ const tests = [
'2',
BACKSPACE,
'3',
- SIGINT
+ SIGINT,
],
// A = Cursor n up
// B = Cursor n down
@@ -315,7 +315,7 @@ const tests = [
'\r\n',
'\x1B[1G', '\x1B[0J',
'> ', '\x1B[3G',
- '\r\n'
+ '\r\n',
],
clean: true
},
@@ -343,7 +343,7 @@ const tests = [
LEFT,
ENTER,
UP,
- ENTER
+ ENTER,
],
// C = Cursor n forward
// D = Cursor n back
@@ -420,7 +420,7 @@ const tests = [
'n', '\r\n',
'\x1B[1G', '\x1B[0J',
'... ', '\x1B[5G',
- '\r\n'
+ '\r\n',
],
clean: true
},
@@ -430,7 +430,7 @@ const tests = [
skip: !process.features.inspector,
test: [
'util.inspect.replDefaults.showHidden',
- ENTER
+ ENTER,
],
expected: [],
clean: false
@@ -447,7 +447,7 @@ const tests = [
' = true',
ENTER,
'[ ]',
- ENTER
+ ENTER,
],
expected: [
prompt,
@@ -487,7 +487,7 @@ const tests = [
WAIT, // The second call is not awaited. It won't trigger the preview.
BACKSPACE,
's',
- BACKSPACE
+ BACKSPACE,
],
expected: [
prompt,
diff --git a/test/parallel/test-repl-inspect-defaults.js b/test/parallel/test-repl-inspect-defaults.js
index 9a033ce1f3dc13..84536eb773223b 100644
--- a/test/parallel/test-repl-inspect-defaults.js
+++ b/test/parallel/test-repl-inspect-defaults.js
@@ -18,7 +18,7 @@ child.on('exit', common.mustCall(() => {
'[ 42, 23 ]',
'1',
'[ 42, ... 1 more item ]',
- ''
+ '',
]
);
}));
diff --git a/test/parallel/test-repl-inspector.js b/test/parallel/test-repl-inspector.js
index acec99208bcf02..1fff9031d500fd 100644
--- a/test/parallel/test-repl-inspector.js
+++ b/test/parallel/test-repl-inspector.js
@@ -28,7 +28,7 @@ putIn.run([
'const session = new inspector.Session()',
'session.connect()',
'session.post("Runtime.evaluate", { expression: "1 + 1" }, console.log)',
- 'session.disconnect()'
+ 'session.disconnect()',
]);
assert(output.includes(
diff --git a/test/parallel/test-repl-persistent-history.js b/test/parallel/test-repl-persistent-history.js
index 705a7c7c236fb0..b0cddf0a2bd020 100644
--- a/test/parallel/test-repl-persistent-history.js
+++ b/test/parallel/test-repl-persistent-history.js
@@ -98,7 +98,7 @@ const tests = [
expected: [
prompt,
'2', '1', '21\n', prompt, prompt,
- "'", '4', '2', "'", "'42'\n", prompt, prompt
+ "'", '4', '2', "'", "'42'\n", prompt, prompt,
],
clean: false
},
@@ -128,7 +128,7 @@ const tests = [
`${prompt}'you look fabulous today'`,
prompt,
`${prompt}'you look fabulous today'`,
- prompt
+ prompt,
]
},
{
@@ -169,7 +169,7 @@ const tests = [
env: {},
test: [UP],
expected: [prompt, homedirErr, prompt, replDisabled, prompt]
- }
+ },
];
const numtests = tests.length;
diff --git a/test/parallel/test-repl-preprocess-top-level-await.js b/test/parallel/test-repl-preprocess-top-level-await.js
index 2a173b7339b8c7..ed1fe90e43e459 100644
--- a/test/parallel/test-repl-preprocess-top-level-await.js
+++ b/test/parallel/test-repl-preprocess-top-level-await.js
@@ -60,7 +60,7 @@ const testCases = [
[ 'var a = await 1; let b = 2; const c = 3;',
'(async () => { void (a = await 1); void (b = 2); void (c = 3); })()' ],
[ 'let o = await 1, p',
- '(async () => { void ( (o = await 1), (p=undefined)) })()' ]
+ '(async () => { void ( (o = await 1), (p=undefined)) })()' ],
];
for (const [input, expected] of testCases) {
diff --git a/test/parallel/test-repl-pretty-custom-stack.js b/test/parallel/test-repl-pretty-custom-stack.js
index d04a394a2e249e..aef34f1b4f6329 100644
--- a/test/parallel/test-repl-pretty-custom-stack.js
+++ b/test/parallel/test-repl-pretty-custom-stack.js
@@ -68,7 +68,7 @@ const tests = [
{
command: '(function() { throw new Error(\'Whoops!\'); })()',
expected: 'Uncaught Error: Whoops!--->\nREPL5:*:*\n'
- }
+ },
];
tests.forEach(run);
diff --git a/test/parallel/test-repl-pretty-stack.js b/test/parallel/test-repl-pretty-stack.js
index 8ab3fef2aaa033..c785bf75a15ba6 100644
--- a/test/parallel/test-repl-pretty-stack.js
+++ b/test/parallel/test-repl-pretty-stack.js
@@ -70,7 +70,7 @@ const tests = [
{
command: '(function() { throw new Error(\'Whoops!\'); })()',
expected: 'Uncaught Error: Whoops!\n at REPL7:*:*\n'
- }
+ },
];
tests.forEach(run);
diff --git a/test/parallel/test-repl-preview.js b/test/parallel/test-repl-preview.js
index b0159bfd646a82..620f41296e91f0 100644
--- a/test/parallel/test-repl-preview.js
+++ b/test/parallel/test-repl-preview.js
@@ -77,7 +77,7 @@ async function tests(options) {
repl.inputStream.run([
'function foo(x) { return x; }',
'function koo() { console.log("abc"); }',
- 'a = undefined;'
+ 'a = undefined;',
]);
const testCases = [{
@@ -86,7 +86,7 @@ async function tests(options) {
preview: [
'foo',
'\x1B[90m[Function: foo]\x1B[39m\x1B[11G\x1B[1A\x1B[1B\x1B[2K\x1B[1A\r',
- '\x1B[36m[Function: foo]\x1B[39m'
+ '\x1B[36m[Function: foo]\x1B[39m',
]
}, {
input: 'koo',
@@ -98,7 +98,7 @@ async function tests(options) {
'\x1B[90m[Function: koo]\x1B[39m\x1B[10G\x1B[1A\x1B[1B\x1B[2K\x1B[1A' +
'\x1B[0Ko',
'\x1B[90m[Function: koo]\x1B[39m\x1B[11G\x1B[1A\x1B[1B\x1B[2K\x1B[1A\r',
- '\x1B[36m[Function: koo]\x1B[39m'
+ '\x1B[36m[Function: koo]\x1B[39m',
]
}, {
input: 'a',
@@ -112,7 +112,7 @@ async function tests(options) {
'\x1B[90m1\x1B[39m\x1B[22G\x1B[1A\x1B[1B\x1B[2K\x1B[1A ',
'\x1B[90m1\x1B[39m\x1B[23G\x1B[1A\x1B[1B\x1B[2K\x1B[1A=== 1',
'\x1B[90mtrue\x1B[39m\x1B[28G\x1B[1A\x1B[1B\x1B[2K\x1B[1A\r',
- '\x1B[33mtrue\x1B[39m'
+ '\x1B[33mtrue\x1B[39m',
]
}, {
input: "{ b: 1 }['b'] === 1;",
@@ -123,14 +123,14 @@ async function tests(options) {
'\x1B[90m1\x1B[39m\x1B[22G\x1B[1A\x1B[1B\x1B[2K\x1B[1A=== 1',
'\x1B[90mtrue\x1B[39m\x1B[27G\x1B[1A\x1B[1B\x1B[2K\x1B[1A;',
'\x1B[90mfalse\x1B[39m\x1B[28G\x1B[1A\x1B[1B\x1B[2K\x1B[1A\r',
- '\x1B[33mfalse\x1B[39m'
+ '\x1B[33mfalse\x1B[39m',
]
}, {
input: '{ a: true }',
noPreview: '{ a: \x1B[33mtrue\x1B[39m }',
preview: [
'{ a: tru\x1B[90me\x1B[39m\x1B[16G\x1B[0Ke }\r',
- '{ a: \x1B[33mtrue\x1B[39m }'
+ '{ a: \x1B[33mtrue\x1B[39m }',
]
}, {
input: '{ a: true };',
@@ -138,7 +138,7 @@ async function tests(options) {
preview: [
'{ a: tru\x1B[90me\x1B[39m\x1B[16G\x1B[0Ke };',
'\x1B[90mtrue\x1B[39m\x1B[20G\x1B[1A\x1B[1B\x1B[2K\x1B[1A\r',
- '\x1B[33mtrue\x1B[39m'
+ '\x1B[33mtrue\x1B[39m',
]
}, {
input: ' \t { a: true};',
@@ -147,7 +147,7 @@ async function tests(options) {
' { a: tru\x1B[90me\x1B[39m\x1B[18G\x1B[0Ke}',
'\x1B[90m{ a: true }\x1B[39m\x1B[20G\x1B[1A\x1B[1B\x1B[2K\x1B[1A;',
'\x1B[90mtrue\x1B[39m\x1B[21G\x1B[1A\x1B[1B\x1B[2K\x1B[1A\r',
- '\x1B[33mtrue\x1B[39m'
+ '\x1B[33mtrue\x1B[39m',
]
}, {
input: '1n + 2n',
@@ -156,7 +156,7 @@ async function tests(options) {
'1n + 2',
'\x1B[90mType[39m\x1B[14G\x1B[1A\x1B[1B\x1B[2K\x1B[1An',
'\x1B[90m3n\x1B[39m\x1B[15G\x1B[1A\x1B[1B\x1B[2K\x1B[1A\r',
- '\x1B[33m3n\x1B[39m'
+ '\x1B[33m3n\x1B[39m',
]
}, {
input: '{};1',
@@ -164,7 +164,7 @@ async function tests(options) {
preview: [
'{};1',
'\x1B[90m1\x1B[39m\x1B[12G\x1B[1A\x1B[1B\x1B[2K\x1B[1A\r',
- '\x1B[33m1\x1B[39m'
+ '\x1B[33m1\x1B[39m',
]
}];
diff --git a/test/parallel/test-repl-programmatic-history.js b/test/parallel/test-repl-programmatic-history.js
index 0eccea655263cd..e2ad2cc66fd44d 100644
--- a/test/parallel/test-repl-programmatic-history.js
+++ b/test/parallel/test-repl-programmatic-history.js
@@ -98,7 +98,7 @@ const tests = [
// TODO(BridgeAR): The line is refreshed too many times. The double prompt
// is redundant and can be optimized away.
'2', '1', '21\n', prompt, prompt,
- "'", '4', '2', "'", "'42'\n", prompt, prompt
+ "'", '4', '2', "'", "'42'\n", prompt, prompt,
],
clean: false
},
@@ -112,7 +112,7 @@ const tests = [
prompt,
`${prompt}21`,
'21\n',
- prompt
+ prompt,
]
},
{
@@ -124,7 +124,7 @@ const tests = [
`${prompt}'you look fabulous today'`,
prompt,
`${prompt}'you look fabulous today'`,
- prompt
+ prompt,
]
},
{
@@ -165,7 +165,7 @@ const tests = [
env: {},
test: [UP],
expected: [prompt, homedirErr, prompt, replDisabled, prompt]
- }
+ },
];
const numtests = tests.length;
diff --git a/test/parallel/test-repl-reverse-search.js b/test/parallel/test-repl-reverse-search.js
index 5027bd7da497fe..5165dc2820d2d6 100644
--- a/test/parallel/test-repl-reverse-search.js
+++ b/test/parallel/test-repl-reverse-search.js
@@ -71,7 +71,7 @@ const tests = [
'ab = "aaaa"', ENTER,
'555 - 909', ENTER,
'{key : {key2 :[] }}', ENTER,
- 'Array(100).fill(1)', ENTER
+ 'Array(100).fill(1)', ENTER,
],
expected: [],
clean: false
@@ -99,7 +99,7 @@ const tests = [
SEARCH_BACKWARDS, // 15
SEARCH_FORWARDS,
ESCAPE, // 17
- ENTER
+ ENTER,
],
// A = Cursor n up
// B = Cursor n down
@@ -179,7 +179,7 @@ const tests = [
'\x1B[1G', '\x1B[0J',
prompt,
'\x1B[3G',
- '\r\n'
+ '\r\n',
],
clean: false
},
@@ -207,7 +207,7 @@ const tests = [
UP, // 15
DOWN,
SEARCH_FORWARDS, // 17
- '\n'
+ '\n',
],
expected: [
'\x1B[1G', '\x1B[0J',
@@ -262,10 +262,10 @@ const tests = [
'-1\n',
'\x1B[1G', '\x1B[0J',
prompt, '\x1B[3G',
- '\r\n'
+ '\r\n',
],
clean: false
- }
+ },
];
const numtests = tests.length;
diff --git a/test/parallel/test-repl-save-load.js b/test/parallel/test-repl-save-load.js
index 9807365a411c4a..7fe535f6431adf 100644
--- a/test/parallel/test-repl-save-load.js
+++ b/test/parallel/test-repl-save-load.js
@@ -46,7 +46,7 @@ testMe._domain.on('error', function(reason) {
const testFile = [
'let inner = (function() {',
' return {one:1};',
- '})()'
+ '})()',
];
const saveFileName = join(tmpdir.path, 'test.save.js');
@@ -121,7 +121,7 @@ putIn.run([`.save ${invalidFileName}`]);
const cmds = [
'function testSave() {',
'return "saved";',
- '}'
+ '}',
];
const putIn = new ArrayStream();
const replServer = repl.start({ terminal: true, stream: putIn });
diff --git a/test/parallel/test-repl-tab-complete.js b/test/parallel/test-repl-tab-complete.js
index 01eac9a0eee2a9..da0ebfba9f965a 100644
--- a/test/parallel/test-repl-tab-complete.js
+++ b/test/parallel/test-repl-tab-complete.js
@@ -68,7 +68,7 @@ testMe._domain.on('error', assert.ifError);
// Tab Complete will not break in an object literal
putIn.run([
'var inner = {',
- 'one:1'
+ 'one:1',
]);
testMe.complete('inner.o', getNoResultsFunction());
@@ -101,7 +101,7 @@ putIn.run(['.clear']);
putIn.run([
'var inner = ( true ',
'?',
- '{one: 1} : '
+ '{one: 1} : ',
]);
testMe.complete('inner.o', getNoResultsFunction());
@@ -110,7 +110,7 @@ putIn.run(['.clear']);
// Tab Complete will return a simple local variable
putIn.run([
'var top = function() {',
- 'var inner = {one:1};'
+ 'var inner = {one:1};',
]);
testMe.complete('inner.o', getNoResultsFunction());
@@ -126,7 +126,7 @@ putIn.run([
'var top = function() {',
'var inner = {',
' one:1',
- '};'
+ '};',
]);
testMe.complete('inner.o', getNoResultsFunction());
@@ -138,7 +138,7 @@ putIn.run([
'var top = function(one, two) {',
'var inner = {',
' one:1',
- '};'
+ '};',
]);
testMe.complete('inner.o', getNoResultsFunction());
@@ -151,7 +151,7 @@ putIn.run([
'(function test () {',
'var inner = {',
' one:1',
- '};'
+ '};',
]);
testMe.complete('inner.o', getNoResultsFunction());
@@ -164,7 +164,7 @@ putIn.run([
' one, two) {',
'var inner = {',
' one:1',
- '};'
+ '};',
]);
testMe.complete('inner.o', getNoResultsFunction());
@@ -177,7 +177,7 @@ putIn.run([
'{',
'var inner = {',
' one:1',
- '};'
+ '};',
]);
testMe.complete('inner.o', getNoResultsFunction());
@@ -191,7 +191,7 @@ putIn.run([
'{',
'var inner = {',
' one:1',
- '};'
+ '};',
]);
testMe.complete('inner.o', getNoResultsFunction());
@@ -199,7 +199,7 @@ putIn.run(['.clear']);
// Make sure tab completion works on non-Objects
putIn.run([
- 'var str = "test";'
+ 'var str = "test";',
]);
testMe.complete('str.len', common.mustCall(function(error, data) {
assert.deepStrictEqual(data, [['str.length'], 'str.len']);
@@ -232,7 +232,7 @@ putIn.run([
'x.b = 2;',
'var y = Object.create(x);',
'y.a = 3;',
- 'y.c = 4;'
+ 'y.c = 4;',
]);
testMe.complete('y.', common.mustCall(function(error, data) {
assert.deepStrictEqual(data, [['y.b', '', 'y.a', 'y.c'], 'y.']);
@@ -368,7 +368,7 @@ testMe.complete("require\t( 'n", common.mustCall(function(error, data) {
putIn.run(['.clear']);
putIn.run([
- 'var custom = "test";'
+ 'var custom = "test";',
]);
testMe.complete('cus', common.mustCall(function(error, data) {
assert.deepStrictEqual(data, [['custom'], 'cus']);
@@ -379,7 +379,7 @@ testMe.complete('cus', common.mustCall(function(error, data) {
putIn.run(['.clear']);
putIn.run([
- 'var proxy = new Proxy({}, {ownKeys: () => { throw new Error(); }});'
+ 'var proxy = new Proxy({}, {ownKeys: () => { throw new Error(); }});',
]);
testMe.complete('proxy.', common.mustCall(function(error, data) {
@@ -515,7 +515,7 @@ testMe.complete('obj.', common.mustCall((error, data) => {
putIn.run([
'var ele = [];',
'for (let i = 0; i < 1e6 + 1; i++) ele[i] = 0;',
- 'ele.biu = 1;'
+ 'ele.biu = 1;',
]);
} else if (type === Buffer) {
putIn.run(['var ele = Buffer.alloc(1e6 + 1); ele.biu = 1;']);
@@ -583,7 +583,7 @@ const testCustomCompleterSyncMode = repl.start({
testCustomCompleterSyncMode.complete('', common.mustCall((error, data) => {
assert.deepStrictEqual(data, [
customCompletions,
- ''
+ '',
]);
}));
@@ -591,7 +591,7 @@ testCustomCompleterSyncMode.complete('', common.mustCall((error, data) => {
testCustomCompleterSyncMode.complete('a', common.mustCall((error, data) => {
assert.deepStrictEqual(data, [
'aaa aa1 aa2'.split(' '),
- 'a'
+ 'a',
]);
}));
@@ -613,7 +613,7 @@ const testCustomCompleterAsyncMode = repl.start({
testCustomCompleterAsyncMode.complete('', common.mustCall((error, data) => {
assert.deepStrictEqual(data, [
customCompletions,
- ''
+ '',
]);
}));
@@ -621,7 +621,7 @@ testCustomCompleterAsyncMode.complete('', common.mustCall((error, data) => {
testCustomCompleterAsyncMode.complete('a', common.mustCall((error, data) => {
assert.deepStrictEqual(data, [
'aaa aa1 aa2'.split(' '),
- 'a'
+ 'a',
]);
}));
diff --git a/test/parallel/test-repl-top-level-await.js b/test/parallel/test-repl-top-level-await.js
index 018d8707009ad9..464aae9b076d4b 100644
--- a/test/parallel/test-repl-top-level-await.js
+++ b/test/parallel/test-repl-top-level-await.js
@@ -81,7 +81,7 @@ async function ordinaryTests() {
// https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-top-level-await.js?rcl=5d0ea979f0ba87655b7ef0e03b58fa3c04986ba6
putIn.run([
'function foo(x) { return x; }',
- 'function koo() { return Promise.resolve(4); }'
+ 'function koo() { return Promise.resolve(4); }',
]);
const testCases = [
['await Promise.resolve(0)', '0'],
@@ -139,9 +139,9 @@ async function ordinaryTests() {
'1',
'2',
'3',
- 'undefined'
- ]
- ]
+ 'undefined',
+ ],
+ ],
];
for (const [input, expected = [`${input}\r`], options = {}] of testCases) {
@@ -167,13 +167,13 @@ async function ctrlCTest() {
putIn.run([
`const timeout = (msecs) => new Promise((resolve) => {
setTimeout(resolve, msecs).unref();
- });`
+ });`,
]);
console.log('Testing Ctrl+C');
assert.deepStrictEqual(await runAndWait([
'await timeout(100000)',
- { ctrl: true, name: 'c' }
+ { ctrl: true, name: 'c' },
]), [
'await timeout(100000)\r',
'Uncaught:',
@@ -181,7 +181,7 @@ async function ctrlCTest() {
'Script execution was interrupted by `SIGINT`] {',
" code: 'ERR_SCRIPT_EXECUTION_INTERRUPTED'",
'}',
- PROMPT
+ PROMPT,
]);
}
diff --git a/test/parallel/test-repl-uncaught-exception-standalone.js b/test/parallel/test-repl-uncaught-exception-standalone.js
index e7371f9f7c617f..8edf47b2436895 100644
--- a/test/parallel/test-repl-uncaught-exception-standalone.js
+++ b/test/parallel/test-repl-uncaught-exception-standalone.js
@@ -24,7 +24,7 @@ child.on('exit', common.mustCall(() => {
'undefined',
// x\n
'> Foobar',
- '> '
+ '> ',
]
);
}));
diff --git a/test/parallel/test-repl-uncaught-exception.js b/test/parallel/test-repl-uncaught-exception.js
index 28e62dff22bf3a..9d443b4e2ca553 100644
--- a/test/parallel/test-repl-uncaught-exception.js
+++ b/test/parallel/test-repl-uncaught-exception.js
@@ -64,7 +64,7 @@ const tests = [
command: 'console.log("Baz");' +
'process.on("uncaughtException", () => console.log("Foobar"));\n',
expected: /^Baz\nUncaught:\nTypeError \[ERR_INVALID_REPL_INPUT]:.*uncaughtException/
- }
+ },
];
process.on('exit', () => {
diff --git a/test/parallel/test-repl-underscore.js b/test/parallel/test-repl-underscore.js
index c05c387471b59f..1802f8b8ff1e86 100644
--- a/test/parallel/test-repl-underscore.js
+++ b/test/parallel/test-repl-underscore.js
@@ -41,7 +41,7 @@ function testSloppyMode() {
'30',
'30',
'40',
- '30'
+ '30',
]);
}
@@ -74,7 +74,7 @@ function testStrictMode() {
'30',
'undefined',
'undefined',
- '30'
+ '30',
]);
}
@@ -107,7 +107,7 @@ function testMagicMode() {
'30',
'undefined',
'50',
- '30'
+ '30',
]);
}
@@ -129,7 +129,7 @@ function testResetContext() {
'Clearing context...',
'10',
'20',
- '20'
+ '20',
]);
}
@@ -216,7 +216,7 @@ function testError() {
'Expression assignment to _error now disabled.',
'0',
'Uncaught Error: quux',
- '0'
+ '0',
]);
});
}
diff --git a/test/parallel/test-repl-use-global.js b/test/parallel/test-repl-use-global.js
index 4ac38304601c0d..3457d0c5ba7210 100644
--- a/test/parallel/test-repl-use-global.js
+++ b/test/parallel/test-repl-use-global.js
@@ -11,7 +11,7 @@ const assert = require('assert');
const globalTestCases = [
[false, 'undefined'],
[true, '\'tacos\''],
- [undefined, 'undefined']
+ [undefined, 'undefined'],
];
const globalTest = (useGlobal, cb, output) => (err, repl) => {
diff --git a/test/parallel/test-repl.js b/test/parallel/test-repl.js
index e900f3ce15579a..bbb95f3fa39f68 100644
--- a/test/parallel/test-repl.js
+++ b/test/parallel/test-repl.js
@@ -120,14 +120,14 @@ const unixTests = [
{
send: '{a:1}',
expect: '{ a: 1 }'
- }
+ },
];
const strictModeTests = [
{
send: 'ref = 1',
expect: [/^Uncaught ReferenceError:\s/]
- }
+ },
];
const errorTests = [
@@ -242,7 +242,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
{
@@ -251,7 +251,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
{
@@ -260,7 +260,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
{
@@ -269,7 +269,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
{
@@ -278,7 +278,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
{
@@ -288,7 +288,7 @@ const errorTests = [
kArrow,
'',
'Uncaught:',
- /^SyntaxError: /
+ /^SyntaxError: /,
]
},
// Named functions can be used:
@@ -373,7 +373,7 @@ const errorTests = [
send: 'npm install foobar',
expect: [
'npm should be run outside of the Node.js REPL, in your normal shell.',
- '(Press Ctrl+D to exit.)'
+ '(Press Ctrl+D to exit.)',
]
},
{
@@ -411,7 +411,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
// Do not fail when a String is created with line continuation
@@ -454,7 +454,7 @@ const errorTests = [
/\.save/,
'',
'Press Ctrl+C to abort current expression, Ctrl+D to exit the REPL',
- /'thefourtheye'/
+ /'thefourtheye'/,
]
},
// Check for wrapped objects.
@@ -468,7 +468,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
{
@@ -573,7 +573,7 @@ const errorTests = [
/^ at .*/,
" code: 'MODULE_NOT_FOUND',",
" requireStack: [ '' ]",
- '}'
+ '}',
]
},
// REPL should handle quotes within regexp literal in multiline mode
@@ -605,7 +605,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
// Mitigate https://github.com/nodejs/node/issues/548
@@ -624,7 +624,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
// Avoid emitting stack trace
@@ -634,7 +634,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
@@ -702,7 +702,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
// Bring back the repl to prompt
@@ -716,7 +716,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
{
@@ -725,7 +725,7 @@ const errorTests = [
'... ... {',
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
{
@@ -734,7 +734,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
{
@@ -751,7 +751,7 @@ const errorTests = [
kSource,
kArrow,
'',
- /^Uncaught SyntaxError: /
+ /^Uncaught SyntaxError: /,
]
},
{
@@ -813,9 +813,9 @@ const tcpTests = [
kArrow,
'',
'Uncaught:',
- /^SyntaxError: .* dynamic import/
+ /^SyntaxError: .* dynamic import/,
]
- }
+ },
];
(async function() {
@@ -871,7 +871,7 @@ function startTCPRepl() {
return Promise.all([
new Promise((resolve) => resolveSocket = resolve),
- new Promise((resolve) => resolveReplServer = resolve)
+ new Promise((resolve) => resolveReplServer = resolve),
]);
}
@@ -916,7 +916,7 @@ function startUnixRepl() {
return Promise.all([
new Promise((resolve) => resolveSocket = resolve),
- new Promise((resolve) => resolveReplServer = resolve)
+ new Promise((resolve) => resolveReplServer = resolve),
]);
}
diff --git a/test/parallel/test-require-extension-over-directory.js b/test/parallel/test-require-extension-over-directory.js
index 92258761513919..d1f7407e3d0ebe 100644
--- a/test/parallel/test-require-extension-over-directory.js
+++ b/test/parallel/test-require-extension-over-directory.js
@@ -18,7 +18,7 @@ assert.strictEqual(
const fakePath = [
fixtures.path('module-extension-over-directory', 'inner'),
'fake',
- '..'
+ '..',
].join(path.sep);
const fixturesRequireDir = require(fakePath);
diff --git a/test/parallel/test-resource-usage.js b/test/parallel/test-resource-usage.js
index ff41452f4a7f3b..d46fe4aeb7acc1 100644
--- a/test/parallel/test-resource-usage.js
+++ b/test/parallel/test-resource-usage.js
@@ -19,7 +19,7 @@ const fields = [
'ipcReceived',
'signalsCount',
'voluntaryContextSwitches',
- 'involuntaryContextSwitches'
+ 'involuntaryContextSwitches',
];
assert.deepStrictEqual(Object.keys(rusage).sort(), fields.sort());
diff --git a/test/parallel/test-source-map-enable.js b/test/parallel/test-source-map-enable.js
index 9df38cba6cac91..766c1e2955465f 100644
--- a/test/parallel/test-source-map-enable.js
+++ b/test/parallel/test-source-map-enable.js
@@ -23,7 +23,7 @@ function nextdir() {
{
const coverageDirectory = nextdir();
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/source-map/basic')
+ require.resolve('../fixtures/source-map/basic'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
if (output.status !== 0) {
console.log(output.stderr.toString());
@@ -38,7 +38,7 @@ function nextdir() {
{
const coverageDirectory = nextdir();
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/source-map/sigint')
+ require.resolve('../fixtures/source-map/sigint'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
if (!common.isWindows) {
if (output.signal !== 'SIGINT') {
@@ -55,7 +55,7 @@ function nextdir() {
{
const coverageDirectory = nextdir();
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/source-map/exit-1')
+ require.resolve('../fixtures/source-map/exit-1'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
assert.strictEqual(output.stderr.toString(), '');
const sourceMap = getSourceMapFromCache('exit-1.js', coverageDirectory);
@@ -67,7 +67,7 @@ function nextdir() {
const coverageDirectory = nextdir();
const output = spawnSync(process.execPath, [
'--no-warnings',
- require.resolve('../fixtures/source-map/esm-basic.mjs')
+ require.resolve('../fixtures/source-map/esm-basic.mjs'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
assert.strictEqual(output.stderr.toString(), '');
const sourceMap = getSourceMapFromCache('esm-basic.mjs', coverageDirectory);
@@ -78,7 +78,7 @@ function nextdir() {
{
const coverageDirectory = nextdir();
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/source-map/disk-relative-path')
+ require.resolve('../fixtures/source-map/disk-relative-path'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
assert.strictEqual(output.status, 0);
assert.strictEqual(output.stderr.toString(), '');
@@ -99,7 +99,7 @@ function nextdir() {
{
const coverageDirectory = nextdir();
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/source-map/inline-base64.js')
+ require.resolve('../fixtures/source-map/inline-base64.js'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
assert.strictEqual(output.status, 0);
assert.strictEqual(output.stderr.toString(), '');
@@ -120,7 +120,7 @@ function nextdir() {
{
const coverageDirectory = nextdir();
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/source-map/inline-base64-type-error.js')
+ require.resolve('../fixtures/source-map/inline-base64-type-error.js'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
assert.strictEqual(output.status, 0);
assert.strictEqual(output.stderr.toString(), '');
@@ -136,7 +136,7 @@ function nextdir() {
{
const coverageDirectory = nextdir();
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/source-map/inline-base64-json-error.js')
+ require.resolve('../fixtures/source-map/inline-base64-json-error.js'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
assert.strictEqual(output.status, 0);
assert.strictEqual(output.stderr.toString(), '');
@@ -152,7 +152,7 @@ function nextdir() {
// is not set.
{
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/source-map/uglify-throw.js')
+ require.resolve('../fixtures/source-map/uglify-throw.js'),
]);
assert.strictEqual(
output.stderr.toString().match(/.*uglify-throw-original\.js:5:9/),
@@ -168,7 +168,7 @@ function nextdir() {
{
const output = spawnSync(process.execPath, [
'--enable-source-maps',
- require.resolve('../fixtures/source-map/uglify-throw.js')
+ require.resolve('../fixtures/source-map/uglify-throw.js'),
]);
assert.match(
output.stderr.toString(),
@@ -185,7 +185,7 @@ function nextdir() {
{
const output = spawnSync(process.execPath, [
'--enable-source-maps',
- require.resolve('../fixtures/source-map/typescript-throw.js')
+ require.resolve('../fixtures/source-map/typescript-throw.js'),
]);
assert.ok(output.stderr.toString().match(/.*typescript-throw\.ts:18:11/));
assert.ok(output.stderr.toString().match(/.*typescript-throw\.ts:24:1/));
@@ -195,7 +195,7 @@ function nextdir() {
{
const output = spawnSync(process.execPath, [
'--enable-source-maps',
- require.resolve('../fixtures/source-map/babel-throw.js')
+ require.resolve('../fixtures/source-map/babel-throw.js'),
]);
assert.ok(
output.stderr.toString().match(/.*babel-throw-original\.js:18:31/)
@@ -206,7 +206,7 @@ function nextdir() {
{
const output = spawnSync(process.execPath, [
'--enable-source-maps',
- require.resolve('../fixtures/source-map/istanbul-throw.js')
+ require.resolve('../fixtures/source-map/istanbul-throw.js'),
]);
assert.ok(
output.stderr.toString().match(/.*istanbul-throw-original\.js:5:9/)
@@ -220,7 +220,7 @@ function nextdir() {
{
const output = spawnSync(process.execPath, [
'--enable-source-maps',
- require.resolve('../fixtures/source-map/babel-esm.mjs')
+ require.resolve('../fixtures/source-map/babel-esm.mjs'),
]);
assert.ok(
output.stderr.toString().match(/.*babel-esm-original\.mjs:9:29/)
@@ -231,7 +231,7 @@ function nextdir() {
{
const coverageDirectory = nextdir();
spawnSync(process.execPath, [
- require.resolve('../fixtures/source-map/inline-base64.js')
+ require.resolve('../fixtures/source-map/inline-base64.js'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
const sourceMap = getSourceMapFromCache(
'inline-base64.js',
@@ -244,7 +244,7 @@ function nextdir() {
{
const coverageDirectory = nextdir();
spawnSync(process.execPath, [
- require.resolve('../fixtures/source-map/istanbul-throw.js')
+ require.resolve('../fixtures/source-map/istanbul-throw.js'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
const sourceMap = getSourceMapFromCache(
'istanbul-throw.js',
@@ -261,7 +261,7 @@ function nextdir() {
{
const output = spawnSync(process.execPath, [
'--enable-source-maps',
- require.resolve('../fixtures/source-map/emptyStackError.js')
+ require.resolve('../fixtures/source-map/emptyStackError.js'),
]);
assert.ok(
@@ -276,7 +276,7 @@ function nextdir() {
{
const output = spawnSync(process.execPath, [
'--enable-source-maps',
- require.resolve('../fixtures/source-map/webpack.js')
+ require.resolve('../fixtures/source-map/webpack.js'),
]);
// Error in original context of source content:
assert.match(
@@ -295,7 +295,7 @@ function nextdir() {
const coverageDirectory = nextdir();
const output = spawnSync(process.execPath, [
'--enable-source-maps',
- require.resolve('../fixtures/source-map/throw-on-require-entry.js')
+ require.resolve('../fixtures/source-map/throw-on-require-entry.js'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
const sourceMap = getSourceMapFromCache(
'throw-on-require.js',
diff --git a/test/parallel/test-stream-pipeline-process.js b/test/parallel/test-stream-pipeline-process.js
index bd17b31eed4564..a535e7263ebf64 100644
--- a/test/parallel/test-stream-pipeline-process.js
+++ b/test/parallel/test-stream-pipeline-process.js
@@ -19,7 +19,7 @@ if (process.argv[2] === 'child') {
'|',
`"${process.execPath}"`,
`"${__filename}"`,
- 'child'
+ 'child',
].join(' '), common.mustSucceed((stdout) => {
assert.strictEqual(stdout.split(os.EOL).shift().trim(), 'hello');
}));
diff --git a/test/parallel/test-stream-pipeline.js b/test/parallel/test-stream-pipeline.js
index ed5a3d9a0b54f4..e2e5fe2e0d561a 100644
--- a/test/parallel/test-stream-pipeline.js
+++ b/test/parallel/test-stream-pipeline.js
@@ -22,7 +22,7 @@ const net = require('net');
const expected = [
Buffer.from('a'),
Buffer.from('b'),
- Buffer.from('c')
+ Buffer.from('c'),
];
const read = new Readable({
@@ -347,7 +347,7 @@ const net = require('net');
const expected = [
Buffer.from('hello'),
- Buffer.from('world')
+ Buffer.from('world'),
];
const rs = new Readable({
diff --git a/test/parallel/test-stream-promises.js b/test/parallel/test-stream-promises.js
index 86c44b279fa4a1..33bfa292720da1 100644
--- a/test/parallel/test-stream-promises.js
+++ b/test/parallel/test-stream-promises.js
@@ -27,7 +27,7 @@ assert.strictEqual(finished, promisify(stream.finished));
const expected = [
Buffer.from('a'),
Buffer.from('b'),
- Buffer.from('c')
+ Buffer.from('c'),
];
const read = new Readable({
diff --git a/test/parallel/test-stream-writev.js b/test/parallel/test-stream-writev.js
index 7aba543f0732f6..5a42411c6f3a93 100644
--- a/test/parallel/test-stream-writev.js
+++ b/test/parallel/test-stream-writev.js
@@ -71,13 +71,13 @@ function test(decode, uncork, multi, next) {
{ encoding: 'buffer',
chunk: [10, 97, 110, 100, 32, 116, 104, 101, 110, 46, 46, 46] },
{ encoding: 'buffer',
- chunk: [250, 206, 190, 167, 222, 173, 190, 239, 222, 202, 251, 173] }
+ chunk: [250, 206, 190, 167, 222, 173, 190, 239, 222, 202, 251, 173] },
] : [
{ encoding: 'ascii', chunk: 'hello, ' },
{ encoding: 'utf8', chunk: 'world' },
{ encoding: 'buffer', chunk: [33] },
{ encoding: 'latin1', chunk: '\nand then...' },
- { encoding: 'hex', chunk: 'facebea7deadbeefdecafbad' }
+ { encoding: 'hex', chunk: 'facebea7deadbeefdecafbad' },
];
let actualChunks;
diff --git a/test/parallel/test-stream2-objects.js b/test/parallel/test-stream2-objects.js
index a6723daca6c761..a713a5de189cfa 100644
--- a/test/parallel/test-stream2-objects.js
+++ b/test/parallel/test-stream2-objects.js
@@ -70,7 +70,7 @@ function fromArray(list) {
r.pipe(toArray(common.mustCall(function(list) {
assert.deepStrictEqual(list, [
{ one: '1' },
- { two: '2' }
+ { two: '2' },
]);
})));
}
@@ -95,7 +95,7 @@ function fromArray(list) {
r.pipe(toArray(common.mustCall(function(list) {
assert.deepStrictEqual(list, [
{ one: '1' },
- { two: '2' }
+ { two: '2' },
]);
})));
}
@@ -114,7 +114,7 @@ function fromArray(list) {
r.pipe(toArray(common.mustCall(function(list) {
assert.deepStrictEqual(list, [
{ one: '1' },
- { two: '2' }
+ { two: '2' },
]);
})));
}
diff --git a/test/parallel/test-stream2-transform.js b/test/parallel/test-stream2-transform.js
index fe27c1c1b6ddcf..849cfb3538b306 100644
--- a/test/parallel/test-stream2-transform.js
+++ b/test/parallel/test-stream2-transform.js
@@ -405,7 +405,7 @@ const { PassThrough, Transform } = require('stream');
{ foo: 'bar' },
100,
'string',
- { nested: { things: [ { foo: 'bar' }, 100, 'string' ] } }
+ { nested: { things: [ { foo: 'bar' }, 100, 'string' ] } },
];
let ended = false;
@@ -446,7 +446,7 @@ const { PassThrough, Transform } = require('stream');
{ foo: 'bar' },
100,
'string',
- { nested: { things: [ { foo: 'bar' }, 100, 'string' ] } }
+ { nested: { things: [ { foo: 'bar' }, 100, 'string' ] } },
];
let ended = false;
diff --git a/test/parallel/test-string-decoder-fuzz.js b/test/parallel/test-string-decoder-fuzz.js
index ac6f74e94981a8..3a6108e8fc993d 100644
--- a/test/parallel/test-string-decoder-fuzz.js
+++ b/test/parallel/test-string-decoder-fuzz.js
@@ -20,7 +20,7 @@ function randBuf(maxLen) {
}
const encodings = [
- 'utf16le', 'utf8', 'ascii', 'hex', 'base64', 'latin1', 'base64url'
+ 'utf16le', 'utf8', 'ascii', 'hex', 'base64', 'latin1', 'base64url',
];
function runSingleFuzzTest() {
diff --git a/test/parallel/test-timers-active.js b/test/parallel/test-timers-active.js
index a98d32c0b042d1..ac79c6fc1e1ca0 100644
--- a/test/parallel/test-timers-active.js
+++ b/test/parallel/test-timers-active.js
@@ -6,7 +6,7 @@ const active = require('timers').active;
// active() should create timers for these
const legitTimers = [
{ _idleTimeout: 0 },
- { _idleTimeout: 1 }
+ { _idleTimeout: 1 },
];
legitTimers.forEach(function(legit) {
diff --git a/test/parallel/test-timers-enroll-invalid-msecs.js b/test/parallel/test-timers-enroll-invalid-msecs.js
index f82bf29d74d973..466f1a2c4a8872 100644
--- a/test/parallel/test-timers-enroll-invalid-msecs.js
+++ b/test/parallel/test-timers-enroll-invalid-msecs.js
@@ -9,7 +9,7 @@ const timers = require('timers');
[],
'foo',
() => { },
- Symbol('foo')
+ Symbol('foo'),
].forEach((val) => {
assert.throws(
() => timers.enroll({}, val),
@@ -23,7 +23,7 @@ const timers = require('timers');
[
-1,
Infinity,
- NaN
+ NaN,
].forEach((val) => {
assert.throws(
() => timers.enroll({}, val),
diff --git a/test/parallel/test-timers-interval-promisified.js b/test/parallel/test-timers-interval-promisified.js
index 60511372485963..28a0d0b47cd182 100644
--- a/test/parallel/test-timers-interval-promisified.js
+++ b/test/parallel/test-timers-interval-promisified.js
@@ -243,6 +243,6 @@ process.on('multipleResolves', common.mustNotCall());
return iterator.return();
}).then(res);
}),
- setPromiseTimeout(time_unit * 3).then(() => post = true)
+ setPromiseTimeout(time_unit * 3).then(() => post = true),
]).then(common.mustCall());
}
diff --git a/test/parallel/test-timers.js b/test/parallel/test-timers.js
index b8733f79f54639..e04c1f3f184946 100644
--- a/test/parallel/test-timers.js
+++ b/test/parallel/test-timers.js
@@ -48,7 +48,7 @@ const inputs = [
1,
1.0,
2147483648, // Browser behavior: timeouts > 2^31-1 run on next tick
- 12345678901234 // ditto
+ 12345678901234, // ditto
];
const timeouts = [];
diff --git a/test/parallel/test-tls-cipher-list.js b/test/parallel/test-tls-cipher-list.js
index b3c34a74bf4ee0..b1a61405898a9a 100644
--- a/test/parallel/test-tls-cipher-list.js
+++ b/test/parallel/test-tls-cipher-list.js
@@ -12,7 +12,7 @@ function doCheck(arg, expression, check) {
let out = '';
arg = arg.concat([
'-pe',
- expression
+ expression,
]);
spawn(process.execPath, arg, {})
.on('error', common.mustNotCall())
diff --git a/test/parallel/test-tls-client-verify.js b/test/parallel/test-tls-client-verify.js
index e584c51cf20746..a8de1078bf2e9a 100644
--- a/test/parallel/test-tls-client-verify.js
+++ b/test/parallel/test-tls-client-verify.js
@@ -35,7 +35,7 @@ const testCases = [
servers: [
{ ok: true, key: 'agent1-key', cert: 'agent1-cert' },
{ ok: false, key: 'agent2-key', cert: 'agent2-cert' },
- { ok: false, key: 'agent3-key', cert: 'agent3-cert' }
+ { ok: false, key: 'agent3-key', cert: 'agent3-cert' },
] },
{ ca: [],
@@ -44,7 +44,7 @@ const testCases = [
servers: [
{ ok: false, key: 'agent1-key', cert: 'agent1-cert' },
{ ok: false, key: 'agent2-key', cert: 'agent2-cert' },
- { ok: false, key: 'agent3-key', cert: 'agent3-cert' }
+ { ok: false, key: 'agent3-key', cert: 'agent3-cert' },
] },
{ ca: ['ca1-cert', 'ca2-cert'],
@@ -53,8 +53,8 @@ const testCases = [
servers: [
{ ok: true, key: 'agent1-key', cert: 'agent1-cert' },
{ ok: false, key: 'agent2-key', cert: 'agent2-cert' },
- { ok: true, key: 'agent3-key', cert: 'agent3-cert' }
- ] }
+ { ok: true, key: 'agent3-key', cert: 'agent3-cert' },
+ ] },
];
diff --git a/test/parallel/test-tls-cnnic-whitelist.js b/test/parallel/test-tls-cnnic-whitelist.js
index e08e93013f6aca..99ad02ee1c66be 100644
--- a/test/parallel/test-tls-cnnic-whitelist.js
+++ b/test/parallel/test-tls-cnnic-whitelist.js
@@ -31,7 +31,7 @@ const testCases = [
rejectUnauthorized: true
},
errorCode: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY'
- }
+ },
];
function runTest(tindex) {
diff --git a/test/parallel/test-tls-ecdh-multiple.js b/test/parallel/test-tls-ecdh-multiple.js
index 1fcfc041bd4050..25e6314a54a58d 100644
--- a/test/parallel/test-tls-ecdh-multiple.js
+++ b/test/parallel/test-tls-ecdh-multiple.js
@@ -62,7 +62,7 @@ process.on('exit', function() {
const unsupportedCurves = [
'wap-wsg-idm-ecid-wtls1',
'c2pnb163v1',
- 'prime192v3'
+ 'prime192v3',
];
// Brainpool is not supported in FIPS mode
diff --git a/test/parallel/test-tls-getprotocol.js b/test/parallel/test-tls-getprotocol.js
index e4a16a818b5ba1..02c683c71c8775 100644
--- a/test/parallel/test-tls-getprotocol.js
+++ b/test/parallel/test-tls-getprotocol.js
@@ -13,7 +13,7 @@ const fixtures = require('../common/fixtures');
const clientConfigs = [
{ secureProtocol: 'TLSv1_method', version: 'TLSv1' },
{ secureProtocol: 'TLSv1_1_method', version: 'TLSv1.1' },
- { secureProtocol: 'TLSv1_2_method', version: 'TLSv1.2' }
+ { secureProtocol: 'TLSv1_2_method', version: 'TLSv1.2' },
];
const serverConfig = {
diff --git a/test/parallel/test-tls-multi-pfx.js b/test/parallel/test-tls-multi-pfx.js
index c20376a82ad8a8..f353183ce2fa0c 100644
--- a/test/parallel/test-tls-multi-pfx.js
+++ b/test/parallel/test-tls-multi-pfx.js
@@ -13,7 +13,7 @@ const options = {
buf: fixtures.readKey('agent1.pfx'),
passphrase: 'sample'
},
- fixtures.readKey('ec.pfx')
+ fixtures.readKey('ec.pfx'),
]
};
diff --git a/test/parallel/test-tls-options-boolean-check.js b/test/parallel/test-tls-options-boolean-check.js
index 4dae8e47c8ea70..900a39f0c1cd42 100644
--- a/test/parallel/test-tls-options-boolean-check.js
+++ b/test/parallel/test-tls-options-boolean-check.js
@@ -61,7 +61,7 @@ const caArrDataView = toDataView(caCert);
[[keyStr, keyStr2], false],
[false, [certStr, certStr2]],
[[{ pem: keyBuff }], false],
- [[{ pem: keyBuff }, { pem: keyBuff }], false]
+ [[{ pem: keyBuff }, { pem: keyBuff }], false],
].forEach(([key, cert]) => {
tls.createServer({ key, cert });
});
@@ -79,7 +79,7 @@ const caArrDataView = toDataView(caCert);
[[keyBuff, true], [certBuff, certBuff2], 1],
[[true, keyStr2], [certStr, certStr2], 0],
[[true, false], [certBuff, certBuff2], 0],
- [true, [certBuff, certBuff2]]
+ [true, [certBuff, certBuff2]],
].forEach(([key, cert, index]) => {
const val = index === undefined ? key : key[index];
assert.throws(() => {
@@ -105,7 +105,7 @@ const caArrDataView = toDataView(caCert);
[[keyBuff, keyBuff2], [true, certBuff2], 0],
[[keyStr, keyStr2], [certStr, true], 1],
[[keyStr, keyStr2], [true, false], 0],
- [[keyStr, keyStr2], true]
+ [[keyStr, keyStr2], true],
].forEach(([key, cert, index]) => {
const val = index === undefined ? cert : cert[index];
assert.throws(() => {
@@ -140,7 +140,7 @@ const caArrDataView = toDataView(caCert);
[keyBuff, certBuff, {}],
[keyBuff, certBuff, 1],
[keyBuff, certBuff, true],
- [keyBuff, certBuff, [caCert, true], 1]
+ [keyBuff, certBuff, [caCert, true], 1],
].forEach(([key, cert, ca, index]) => {
const val = index === undefined ? ca : ca[index];
assert.throws(() => {
@@ -161,7 +161,7 @@ const caArrDataView = toDataView(caCert);
[false, false, false],
[undefined, undefined, undefined],
['', '', ''],
- [0, 0, 0]
+ [0, 0, 0],
].forEach(([key, cert, ca]) => {
tls.createSecureContext({ key, cert, ca });
});
diff --git a/test/parallel/test-tls-psk-server.js b/test/parallel/test-tls-psk-server.js
index 434d31380fe2ad..b9260958401522 100644
--- a/test/parallel/test-tls-psk-server.js
+++ b/test/parallel/test-tls-psk-server.js
@@ -46,7 +46,7 @@ server.listen(0, () => {
'-connect', `127.0.0.1:${server.address().port}`,
'-cipher', CIPHERS,
'-psk', KEY,
- '-psk_identity', IDENTITY
+ '-psk_identity', IDENTITY,
]);
let out = '';
diff --git a/test/parallel/test-tls-server-verify.js b/test/parallel/test-tls-server-verify.js
index fe525b2fd1d5af..51ccd0d747fdf5 100644
--- a/test/parallel/test-tls-server-verify.js
+++ b/test/parallel/test-tls-server-verify.js
@@ -53,7 +53,7 @@ const testCases =
[{ name: 'agent1', shouldReject: false, shouldAuth: false },
{ name: 'agent2', shouldReject: false, shouldAuth: false },
{ name: 'agent3', shouldReject: false, shouldAuth: false },
- { name: 'nocert', shouldReject: false, shouldAuth: false }
+ { name: 'nocert', shouldReject: false, shouldAuth: false },
] },
{ title: 'Allow both authed and unauthed connections with CA1',
@@ -65,7 +65,7 @@ const testCases =
[{ name: 'agent1', shouldReject: false, shouldAuth: true },
{ name: 'agent2', shouldReject: false, shouldAuth: false },
{ name: 'agent3', shouldReject: false, shouldAuth: false },
- { name: 'nocert', shouldReject: false, shouldAuth: false }
+ { name: 'nocert', shouldReject: false, shouldAuth: false },
] },
{ title: 'Do not request certs at connection. Do that later',
@@ -77,7 +77,7 @@ const testCases =
[{ name: 'agent1', shouldReject: false, shouldAuth: true },
{ name: 'agent2', shouldReject: false, shouldAuth: false },
{ name: 'agent3', shouldReject: false, shouldAuth: false },
- { name: 'nocert', shouldReject: false, shouldAuth: false }
+ { name: 'nocert', shouldReject: false, shouldAuth: false },
] },
{ title: 'Allow only authed connections with CA1',
@@ -89,7 +89,7 @@ const testCases =
[{ name: 'agent1', shouldReject: false, shouldAuth: true },
{ name: 'agent2', shouldReject: true },
{ name: 'agent3', shouldReject: true },
- { name: 'nocert', shouldReject: true }
+ { name: 'nocert', shouldReject: true },
] },
{ title: 'Allow only authed connections with CA1 and CA2',
@@ -101,7 +101,7 @@ const testCases =
[{ name: 'agent1', shouldReject: false, shouldAuth: true },
{ name: 'agent2', shouldReject: true },
{ name: 'agent3', shouldReject: false, shouldAuth: true },
- { name: 'nocert', shouldReject: true }
+ { name: 'nocert', shouldReject: true },
] },
@@ -117,8 +117,8 @@ const testCases =
{ name: 'agent3', shouldReject: false, shouldAuth: true },
// Agent4 has a cert in the CRL.
{ name: 'agent4', shouldReject: true, shouldAuth: false },
- { name: 'nocert', shouldReject: true }
- ] }
+ { name: 'nocert', shouldReject: true },
+ ] },
];
function filenamePEM(n) {
diff --git a/test/parallel/test-tls-session-cache.js b/test/parallel/test-tls-session-cache.js
index 92d39f763fc3b8..c4bebff2e32085 100644
--- a/test/parallel/test-tls-session-cache.js
+++ b/test/parallel/test-tls-session-cache.js
@@ -104,7 +104,7 @@ function doTest(testOptions, callback) {
'-servername', 'ohgod',
'-key', fixtures.path('keys/rsa_private.pem'),
'-cert', fixtures.path('keys/rsa_cert.crt'),
- '-reconnect'
+ '-reconnect',
].concat(testOptions.tickets ? [] : '-no_ticket');
function spawnClient() {
diff --git a/test/parallel/test-tls-set-secure-context.js b/test/parallel/test-tls-set-secure-context.js
index 1e2abffa98bf67..d62b6b9f94f601 100644
--- a/test/parallel/test-tls-set-secure-context.js
+++ b/test/parallel/test-tls-set-secure-context.js
@@ -21,7 +21,7 @@ const credentialOptions = [
key: fixtures.readKey('agent2-key.pem'),
cert: fixtures.readKey('agent2-cert.pem'),
ca: fixtures.readKey('ca2-cert.pem')
- }
+ },
];
let firstResponse;
diff --git a/test/parallel/test-tls-startcom-wosign-whitelist.js b/test/parallel/test-tls-startcom-wosign-whitelist.js
index 33da14884836bf..56ffd73aac0e54 100644
--- a/test/parallel/test-tls-startcom-wosign-whitelist.js
+++ b/test/parallel/test-tls-startcom-wosign-whitelist.js
@@ -39,7 +39,7 @@ const testCases = [
rejectUnauthorized: true
},
errorCode: 'CERT_REVOKED'
- }
+ },
];
diff --git a/test/parallel/test-tls-write-error.js b/test/parallel/test-tls-write-error.js
index 776fe65c722637..b06f2fa2c53ea7 100644
--- a/test/parallel/test-tls-write-error.js
+++ b/test/parallel/test-tls-write-error.js
@@ -46,7 +46,7 @@ const server = https.createServer(opts, (req, res) => {
cke,
ccs,
client.encrypt(finished),
- client.encrypt(ill)
+ client.encrypt(ill),
]);
client.write(frames, common.mustCall(() => {
client.end();
diff --git a/test/parallel/test-trace-events-api.js b/test/parallel/test-trace-events-api.js
index fa152334bea26c..1cd0210f39aeeb 100644
--- a/test/parallel/test-trace-events-api.js
+++ b/test/parallel/test-trace-events-api.js
@@ -63,7 +63,7 @@ assert.strictEqual(tracing.enabled, true);
assert.strictEqual(getEnabledCategories(),
[
- ...[enabledCategories].filter((_) => !!_), 'node.perf'
+ ...[enabledCategories].filter((_) => !!_), 'node.perf',
].join(','));
tracing.disable();
@@ -142,7 +142,7 @@ function testApiInChildProcess(execArgs, cb) {
'--expose-gc',
'--expose-internals',
'--no-warnings',
- ...execArgs
+ ...execArgs,
]
});
diff --git a/test/parallel/test-trace-events-bootstrap.js b/test/parallel/test-trace-events-bootstrap.js
index 634ee7ece0294f..3b9cb95a69f7b6 100644
--- a/test/parallel/test-trace-events-bootstrap.js
+++ b/test/parallel/test-trace-events-bootstrap.js
@@ -12,7 +12,7 @@ const names = [
'v8Start',
'loopStart',
'loopExit',
- 'bootstrapComplete'
+ 'bootstrapComplete',
];
if (process.argv[2] === 'child') {
@@ -25,7 +25,7 @@ if (process.argv[2] === 'child') {
cwd: tmpdir.path,
execArgv: [
'--trace-event-categories',
- 'node.bootstrap'
+ 'node.bootstrap',
]
});
diff --git a/test/parallel/test-trace-events-console.js b/test/parallel/test-trace-events-console.js
index a4860b5da008b4..01a532d69e704a 100644
--- a/test/parallel/test-trace-events-console.js
+++ b/test/parallel/test-trace-events-console.js
@@ -11,7 +11,7 @@ const tmpdir = require('../common/tmpdir');
const names = [
'time::foo',
- 'count::bar'
+ 'count::bar',
];
const expectedCounts = [ 1, 2, 0 ];
const expectedTimeTypes = [ 'b', 'n', 'e' ];
@@ -37,7 +37,7 @@ if (process.argv[2] === 'child') {
cwd: tmpdir.path,
execArgv: [
'--trace-event-categories',
- 'node.console'
+ 'node.console',
]
});
diff --git a/test/parallel/test-trace-events-environment.js b/test/parallel/test-trace-events-environment.js
index 75714283fb1335..8105b8394b0d71 100644
--- a/test/parallel/test-trace-events-environment.js
+++ b/test/parallel/test-trace-events-environment.js
@@ -17,7 +17,7 @@ const names = new Set([
'RunTimers',
'BeforeExit',
'RunCleanup',
- 'AtExit'
+ 'AtExit',
]);
if (process.argv[2] === 'child') {
@@ -37,7 +37,7 @@ if (process.argv[2] === 'child') {
cwd: tmpdir.path,
execArgv: [
'--trace-event-categories',
- 'node.environment'
+ 'node.environment',
]
});
diff --git a/test/parallel/test-trace-events-file-pattern.js b/test/parallel/test-trace-events-file-pattern.js
index d9cd8e66d23646..0c5097b2e174fd 100644
--- a/test/parallel/test-trace-events-file-pattern.js
+++ b/test/parallel/test-trace-events-file-pattern.js
@@ -16,7 +16,7 @@ const proc = cp.spawn(process.execPath, [
'--trace-event-file-pattern',
// eslint-disable-next-line no-template-curly-in-string
'${pid}-${rotation}-${pid}-${rotation}.tracing.log',
- '-e', CODE
+ '-e', CODE,
], { cwd: tmpdir.path });
proc.once('exit', common.mustCall(() => {
diff --git a/test/parallel/test-trace-events-promises.js b/test/parallel/test-trace-events-promises.js
index 0dd4fddc6d75ba..eec463369c119e 100644
--- a/test/parallel/test-trace-events-promises.js
+++ b/test/parallel/test-trace-events-promises.js
@@ -23,7 +23,7 @@ if (process.argv[2] === 'child') {
execArgv: [
'--no-warnings',
'--trace-event-categories',
- 'node.promises.rejections'
+ 'node.promises.rejections',
]
});
diff --git a/test/parallel/test-trace-events-vm.js b/test/parallel/test-trace-events-vm.js
index 3e5d32b6c3f82c..b3d3a403bec711 100644
--- a/test/parallel/test-trace-events-vm.js
+++ b/test/parallel/test-trace-events-vm.js
@@ -9,7 +9,7 @@ const tmpdir = require('../common/tmpdir');
const names = [
'ContextifyScript::New',
'RunInThisContext',
- 'RunInContext'
+ 'RunInContext',
];
if (process.argv[2] === 'child') {
@@ -23,7 +23,7 @@ if (process.argv[2] === 'child') {
cwd: tmpdir.path,
execArgv: [
'--trace-event-categories',
- 'node.vm.script'
+ 'node.vm.script',
]
});
diff --git a/test/parallel/test-tracing-no-crash.js b/test/parallel/test-tracing-no-crash.js
index 0ae402f5288cca..2e5d42b6067bb7 100644
--- a/test/parallel/test-tracing-no-crash.js
+++ b/test/parallel/test-tracing-no-crash.js
@@ -9,7 +9,7 @@ function CheckNoSignalAndErrorCodeOne(code, signal) {
}
const child = spawn(process.execPath, [
- '--trace-event-categories', 'madeup', '-e', 'throw new Error()'
+ '--trace-event-categories', 'madeup', '-e', 'throw new Error()',
], { stdio: [ 'inherit', 'inherit', 'pipe' ] });
child.on('exit', common.mustCall(CheckNoSignalAndErrorCodeOne));
diff --git a/test/parallel/test-tty-backwards-api.js b/test/parallel/test-tty-backwards-api.js
index b4005bad61a3b1..16e71aab9e187c 100644
--- a/test/parallel/test-tty-backwards-api.js
+++ b/test/parallel/test-tty-backwards-api.js
@@ -19,7 +19,7 @@ const { WriteStream } = require('tty');
'cursorTo',
'moveCursor',
'clearLine',
- 'clearScreenDown'
+ 'clearScreenDown',
].forEach((method) => {
readline[method] = common.mustCall(function() {
const lastArg = arguments[arguments.length - 1];
diff --git a/test/parallel/test-url-domain-ascii-unicode.js b/test/parallel/test-url-domain-ascii-unicode.js
index 49259a7ab0f4c4..737294c241fbfe 100644
--- a/test/parallel/test-url-domain-ascii-unicode.js
+++ b/test/parallel/test-url-domain-ascii-unicode.js
@@ -18,7 +18,7 @@ const domainWithASCII = [
['名がドメイン.com', 'xn--v8jxj3d1dzdz08w.com'],
['افغانستا.icom.museum', 'xn--mgbaal8b0b9b2b.icom.museum'],
['الجزائر.icom.fake', 'xn--lgbbat1ad8j.icom.fake'],
- ['भारत.org', 'xn--h2brj9c.org']
+ ['भारत.org', 'xn--h2brj9c.org'],
];
domainWithASCII.forEach((pair) => {
diff --git a/test/parallel/test-url-format-invalid-input.js b/test/parallel/test-url-format-invalid-input.js
index 99a35b76f08e72..efa1a9ba1df6bf 100644
--- a/test/parallel/test-url-format-invalid-input.js
+++ b/test/parallel/test-url-format-invalid-input.js
@@ -10,7 +10,7 @@ const throwsObjsAndReportTypes = [
false,
0,
function() {},
- Symbol('foo')
+ Symbol('foo'),
];
for (const urlObject of throwsObjsAndReportTypes) {
diff --git a/test/parallel/test-url-parse-invalid-input.js b/test/parallel/test-url-parse-invalid-input.js
index ff63e91ecda2ab..55db598e04f808 100644
--- a/test/parallel/test-url-parse-invalid-input.js
+++ b/test/parallel/test-url-parse-invalid-input.js
@@ -14,7 +14,7 @@ const url = require('url');
[[], 'object'],
[{}, 'object'],
[() => {}, 'function'],
- [Symbol('foo'), 'symbol']
+ [Symbol('foo'), 'symbol'],
].forEach(([val, type]) => {
assert.throws(() => {
url.parse(val);
diff --git a/test/parallel/test-url-pathtofileurl.js b/test/parallel/test-url-pathtofileurl.js
index 79adb58b77d754..068a04e6613b28 100644
--- a/test/parallel/test-url-pathtofileurl.js
+++ b/test/parallel/test-url-pathtofileurl.js
@@ -90,7 +90,7 @@ const url = require('url');
// Rocket emoji (non-BMP code point)
{ path: 'C:\\🚀', expected: 'file:///C:/%F0%9F%9A%80' },
// UNC path (see https://docs.microsoft.com/en-us/archive/blogs/ie/file-uris-in-windows)
- { path: '\\\\nas\\My Docs\\File.doc', expected: 'file://nas/My%20Docs/File.doc' }
+ { path: '\\\\nas\\My Docs\\File.doc', expected: 'file://nas/My%20Docs/File.doc' },
];
} else {
testCases = [
diff --git a/test/parallel/test-url-relative.js b/test/parallel/test-url-relative.js
index e4aee99a7789ab..1eb2bdc58fc3a6 100644
--- a/test/parallel/test-url-relative.js
+++ b/test/parallel/test-url-relative.js
@@ -52,7 +52,7 @@ const relativeTests = [
'http://example.com/a/b/c/d'],
['/foo/bar/baz', '/../etc/passwd', '/etc/passwd'],
['http://localhost', 'file:///Users/foo', 'file:///Users/foo'],
- ['http://localhost', 'file://foo/Users', 'file://foo/Users']
+ ['http://localhost', 'file://foo/Users', 'file://foo/Users'],
];
relativeTests.forEach(function(relativeTest) {
const a = url.resolve(relativeTest[0], relativeTest[1]);
@@ -76,7 +76,7 @@ const bases = [
'http://a/b/c/d;p?q=1/2',
'http://a/b/c/d;p=1/2?q',
'fred:///s//a/b/c',
- 'http:///s//a/b/c'
+ 'http:///s//a/b/c',
];
// [to, from, result]
@@ -371,7 +371,7 @@ const relativeTests2 = [
'https://user:password@example.com/foo'],
// No path at all
- ['#hash1', '#hash2', '#hash1']
+ ['#hash1', '#hash2', '#hash1'],
];
relativeTests2.forEach(function(relativeTest) {
const a = url.resolve(relativeTest[1], relativeTest[0]);
diff --git a/test/parallel/test-util-callbackify.js b/test/parallel/test-util-callbackify.js
index 73234e71b7ce49..444e10b16bf85a 100644
--- a/test/parallel/test-util-callbackify.js
+++ b/test/parallel/test-util-callbackify.js
@@ -20,7 +20,7 @@ const values = [
Symbol('I am a symbol'),
function ok() {},
['array', 'with', 4, 'values'],
- new Error('boo')
+ new Error('boo'),
];
{
diff --git a/test/parallel/test-util-format.js b/test/parallel/test-util-format.js
index 11fe24fce70770..3d6404076471dd 100644
--- a/test/parallel/test-util-format.js
+++ b/test/parallel/test-util-format.js
@@ -484,7 +484,7 @@ assert.strictEqual(
5n,
5,
'test',
- Symbol()
+ Symbol(),
].forEach((invalidOptions) => {
assert.throws(() => {
util.formatWithOptions(invalidOptions, { a: true });
diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js
index f70090f48939d7..37d669c540eb52 100644
--- a/test/parallel/test-util-inspect.js
+++ b/test/parallel/test-util-inspect.js
@@ -495,7 +495,7 @@ assert.strictEqual(
'true,',
"'4294967296': true,",
"'4294967295': true,",
- "'4294967297': true\n]"
+ "'4294967297': true\n]",
].join('\n '));
}
@@ -640,7 +640,7 @@ assert.strictEqual(util.inspect(-5e-324), '-5e-324');
new Error(),
new Error('FAIL'),
new TypeError('FAIL'),
- new SyntaxError('FAIL')
+ new SyntaxError('FAIL'),
].forEach((err) => {
assert.strictEqual(util.inspect(err), err.stack);
});
@@ -1629,7 +1629,7 @@ util.inspect(process);
" 'za' => 1,",
" 'zb' => 'test'",
' }',
- '}'
+ '}',
].join('\n');
assert.strictEqual(out, expect);
@@ -1637,7 +1637,7 @@ util.inspect(process);
expect = [
"'Lorem ipsum dolor\\n' +",
" 'sit amet,\\tconsectetur adipiscing elit, sed do eiusmod tempor " +
- "incididunt ut labore et dolore magna aliqua.'"
+ "incididunt ut labore et dolore magna aliqua.'",
].join('\n');
assert.strictEqual(out, expect);
@@ -1651,7 +1651,7 @@ util.inspect(process);
'12 45 78 01 34 67 90 23 56 89 123456789012345678901234567890',
{ compact: false, breakLength: 3 });
expect = [
- "'12 45 78 01 34 67 90 23 56 89 123456789012345678901234567890'"
+ "'12 45 78 01 34 67 90 23 56 89 123456789012345678901234567890'",
].join('\n');
assert.strictEqual(out, expect);
@@ -1662,7 +1662,7 @@ util.inspect(process);
'{',
' a: [Function (anonymous)],',
' b: [Number: 3]',
- '}'
+ '}',
].join('\n');
assert.strictEqual(out, expect);
@@ -1674,7 +1674,7 @@ util.inspect(process);
" [name]: ''",
' },',
' b: [Number: 3]',
- '}'
+ '}',
].join('\n');
assert.strictEqual(out, expect);
@@ -1752,7 +1752,7 @@ util.inspect(process);
' [Circular *1],',
" [Symbol(Symbol.toStringTag)]: 'Map Iterator'",
' }',
- '}'
+ '}',
].join('\n');
assert.strict.equal(out, expected);
@@ -1791,7 +1791,7 @@ util.inspect(process);
' [Circular *1],',
" [Symbol(Symbol.toStringTag)]: 'Map Iterator'",
' }',
- '}'
+ '}',
].join('\n');
assert.strict.equal(out, expected);
@@ -1832,7 +1832,7 @@ util.inspect(process);
' foo: true } ],',
' [Circular *1],',
' [Symbol(Symbol.toStringTag)]:',
- " 'Map Iterator' } }"
+ " 'Map Iterator' } }",
].join('\n');
assert.strict.equal(out, expected);
@@ -1930,7 +1930,7 @@ assert.strictEqual(util.inspect('"\'${a}'), "'\"\\'${a}'");
get name() {
return 'BazError';
}
- }, undefined]
+ }, undefined],
].forEach(([Class, message], i) => {
console.log('Test %i', i);
const foo = new Class(message);
@@ -2000,7 +2000,7 @@ assert.strictEqual(util.inspect('"\'${a}'), "'\"\\'${a}'");
// Foobar !!!
[class X extends /****/ Error
// More comments
- {}, '[class X extends Error]']
+ {}, '[class X extends Error]'],
/* eslint-enable spaced-comment, no-multi-spaces, brace-style */
].forEach(([clazz, string]) => {
const inspected = util.inspect(clazz);
@@ -2092,7 +2092,7 @@ assert.strictEqual(util.inspect('"\'${a}'), "'\"\\'${a}'");
[new Promise((resolve) => setTimeout(resolve, 10)), 'Promise { }'],
[new WeakSet(), 'WeakSet { }'],
[new WeakMap(), 'WeakMap { }'],
- [/foobar/g, '/foobar/g']
+ [/foobar/g, '/foobar/g'],
].forEach(([value, expected]) => {
Object.defineProperty(value, 'valueOf', {
get() {
@@ -2141,7 +2141,7 @@ assert.strictEqual(util.inspect('"\'${a}'), "'\"\\'${a}'");
'{\n [Uint8Contents]: <00 00>,\n byteLength: undefined\n}'],
[/foobar/, '[RegExp: null prototype] /foobar/'],
[new Date('Sun, 14 Feb 2010 11:48:40 GMT'),
- '[Date: null prototype] 2010-02-14T11:48:40.000Z']
+ '[Date: null prototype] 2010-02-14T11:48:40.000Z'],
].forEach(([value, expected]) => {
assert.strictEqual(
util.inspect(Object.setPrototypeOf(value, null)),
@@ -2163,7 +2163,7 @@ assert.strictEqual(util.inspect('"\'${a}'), "'\"\\'${a}'");
[10],
'[\n 0n, 0n, 0n, 0n, 0n,\n 0n, 0n, 0n, 0n, 0n\n]'],
[Date, ['Sun, 14 Feb 2010 11:48:40 GMT'], '2010-02-14T11:48:40.000Z'],
- [Date, ['invalid_date'], 'Invalid Date']
+ [Date, ['invalid_date'], 'Invalid Date'],
].forEach(([base, input, rawExpected]) => {
class Foo extends base {}
const value = new Foo(...input);
@@ -2253,7 +2253,7 @@ assert.strictEqual(
'blue',
'magenta',
'cyan',
- 'white'
+ 'white',
].forEach((color, i) => {
assert.deepStrictEqual(inspect.colors[color], [30 + i, 39]);
assert.deepStrictEqual(inspect.colors[`${color}Bright`], [90 + i, 39]);
@@ -2431,7 +2431,7 @@ assert.strictEqual(
b: [
1,
2,
- [ 1, 2, { a: 1, b: 2, c: 3 } ]
+ [ 1, 2, { a: 1, b: 2, c: 3 } ],
],
c: ['foo', 4, 444444],
d: Array.from({ length: 101 }).map((e, i) => {
@@ -2523,7 +2523,7 @@ assert.strictEqual(
" 'This text is too long for grouping!',",
" 'This text is too long for grouping!'",
' ]',
- '}'
+ '}',
].join('\n');
assert.strictEqual(out, expected);
@@ -2531,7 +2531,7 @@ assert.strictEqual(
obj = [
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 123456789
+ 1, 1, 1, 1, 1, 1, 123456789,
];
out = util.inspect(obj, { compact: 3 });
@@ -2545,7 +2545,7 @@ assert.strictEqual(
' 1, 1, 1, 1,',
' 1, 1, 1, 1,',
' 1, 1, 123456789',
- ']'
+ ']',
].join('\n');
assert.strictEqual(out, expected);
@@ -2553,7 +2553,7 @@ assert.strictEqual(
// Unicode support. あ has a length of one and a width of two.
obj = [
'123', '123', '123', '123', 'あああ',
- '123', '123', '123', '123', 'あああ'
+ '123', '123', '123', '123', 'あああ',
];
out = util.inspect(obj, { compact: 3 });
@@ -2627,7 +2627,7 @@ assert.strictEqual(
' \u001b[33m52\u001b[39m, \u001b[33m53\u001b[39m, \u001b[33m54\u001b[39m, \u001b[33m55\u001b[39m,',
' \u001b[33m56\u001b[39m, \u001b[33m57\u001b[39m, \u001b[33m58\u001b[39m, \u001b[33m59\u001b[39m',
/* eslint-enable max-len */
- ']'
+ ']',
].join('\n');
assert.strictEqual(out, expected);
@@ -2675,7 +2675,7 @@ assert.strictEqual(
'string_decoder', 'tls', 'trace_events',
'tty', 'url', 'v8',
'vm', 'worker_threads', 'zlib',
- '_', '_error', 'util'
+ '_', '_error', 'util',
];
out = util.inspect(
@@ -2721,7 +2721,7 @@ assert.strictEqual(
" 'tty', 'url', 'v8',",
" 'vm', 'worker_threads', 'zlib',",
" '_', '_error', 'util'",
- ']'
+ ']',
].join('\n');
assert.strictEqual(out, expected);
@@ -2741,10 +2741,10 @@ assert.strictEqual(
' at Module.require [as weird/name] (node:internal/aaaaa/loader:735:19)',
' at require (node:internal/modules/cjs/helpers:14:16)',
' at /test/test-util-inspect.js:2239:9',
- ' at getActual (node:assert:592:5)'
+ ' at getActual (node:assert:592:5)',
];
const isNodeCoreFile = [
- false, false, true, true, false, true, false, true, false, true
+ false, false, true, true, false, true, false, true, false, true,
];
const err = new TypeError('Wonderful message!');
err.stack = stack.join('\n');
diff --git a/test/parallel/test-util-log.js b/test/parallel/test-util-log.js
index 3de79b835d85a3..854746290ec796 100644
--- a/test/parallel/test-util-log.js
+++ b/test/parallel/test-util-log.js
@@ -48,7 +48,7 @@ const tests = [
{ input: function() {}, output: '[Function: input]' },
{ input: parseInt('not a number', 10), output: 'NaN' },
{ input: { answer: 42 }, output: '{ answer: 42 }' },
- { input: [1, 2, 3], output: '[ 1, 2, 3 ]' }
+ { input: [1, 2, 3], output: '[ 1, 2, 3 ]' },
];
// test util.log()
diff --git a/test/parallel/test-util-promisify.js b/test/parallel/test-util-promisify.js
index 70125278d96164..7edeb6e493993e 100644
--- a/test/parallel/test-util-promisify.js
+++ b/test/parallel/test-util-promisify.js
@@ -193,7 +193,7 @@ const stat = promisify(fs.stat);
}),
b.then(assert.fail, function(e) {
assert.strictEqual(err, e);
- })
+ }),
]);
}
diff --git a/test/parallel/test-util-types.js b/test/parallel/test-util-types.js
index ead9bf54697b11..189d084ee34ff1 100644
--- a/test/parallel/test-util-types.js
+++ b/test/parallel/test-util-types.js
@@ -73,7 +73,7 @@ for (const [ value, _method ] of [
new Number(),
new String(),
Object(Symbol()),
- Object(BigInt(0))
+ Object(BigInt(0)),
].forEach((entry) => assert(types.isBoxedPrimitive(entry)));
{
@@ -194,7 +194,7 @@ for (const [ value, _method ] of [
float32Array, fakeFloat32Array, stealthyFloat32Array,
float64Array, fakeFloat64Array, stealthyFloat64Array,
bigInt64Array, fakeBigInt64Array, stealthyBigInt64Array,
- bigUint64Array, fakeBigUint64Array, stealthyBigUint64Array
+ bigUint64Array, fakeBigUint64Array, stealthyBigUint64Array,
];
const expected = {
@@ -211,7 +211,7 @@ for (const [ value, _method ] of [
float32Array, stealthyFloat32Array,
float64Array, stealthyFloat64Array,
bigInt64Array, stealthyBigInt64Array,
- bigUint64Array, stealthyBigUint64Array
+ bigUint64Array, stealthyBigUint64Array,
],
isTypedArray: [
buffer,
@@ -225,40 +225,40 @@ for (const [ value, _method ] of [
float32Array, stealthyFloat32Array,
float64Array, stealthyFloat64Array,
bigInt64Array, stealthyBigInt64Array,
- bigUint64Array, stealthyBigUint64Array
+ bigUint64Array, stealthyBigUint64Array,
],
isUint8Array: [
- buffer, uint8Array, stealthyUint8Array
+ buffer, uint8Array, stealthyUint8Array,
],
isUint8ClampedArray: [
- uint8ClampedArray, stealthyUint8ClampedArray
+ uint8ClampedArray, stealthyUint8ClampedArray,
],
isUint16Array: [
- uint16Array, stealthyUint16Array
+ uint16Array, stealthyUint16Array,
],
isUint32Array: [
- uint32Array, stealthyUint32Array
+ uint32Array, stealthyUint32Array,
],
isInt8Array: [
- int8Array, stealthyInt8Array
+ int8Array, stealthyInt8Array,
],
isInt16Array: [
- int16Array, stealthyInt16Array
+ int16Array, stealthyInt16Array,
],
isInt32Array: [
- int32Array, stealthyInt32Array
+ int32Array, stealthyInt32Array,
],
isFloat32Array: [
- float32Array, stealthyFloat32Array
+ float32Array, stealthyFloat32Array,
],
isFloat64Array: [
- float64Array, stealthyFloat64Array
+ float64Array, stealthyFloat64Array,
],
isBigInt64Array: [
- bigInt64Array, stealthyBigInt64Array
+ bigInt64Array, stealthyBigInt64Array,
],
isBigUint64Array: [
- bigUint64Array, stealthyBigUint64Array
+ bigUint64Array, stealthyBigUint64Array,
]
};
diff --git a/test/parallel/test-v8-coverage.js b/test/parallel/test-v8-coverage.js
index 2e70ce91fead6d..ca5301b8bd08e0 100644
--- a/test/parallel/test-v8-coverage.js
+++ b/test/parallel/test-v8-coverage.js
@@ -20,7 +20,7 @@ function nextdir() {
{
const coverageDirectory = path.join(tmpdir.path, nextdir());
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/v8-coverage/basic')
+ require.resolve('../fixtures/v8-coverage/basic'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
if (output.status !== 0) {
console.log(output.stderr.toString());
@@ -39,7 +39,7 @@ function nextdir() {
{
const coverageDirectory = path.join(tmpdir.path, nextdir());
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/v8-coverage/throw')
+ require.resolve('../fixtures/v8-coverage/throw'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
if (output.status !== 1) {
console.log(output.stderr.toString());
@@ -57,7 +57,7 @@ function nextdir() {
{
const coverageDirectory = path.join(tmpdir.path, nextdir());
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/v8-coverage/exit-1')
+ require.resolve('../fixtures/v8-coverage/exit-1'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
if (output.status !== 1) {
console.log(output.stderr.toString());
@@ -76,7 +76,7 @@ function nextdir() {
{
const coverageDirectory = path.join(tmpdir.path, nextdir());
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/v8-coverage/sigint')
+ require.resolve('../fixtures/v8-coverage/sigint'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
if (!common.isWindows) {
if (output.signal !== 'SIGINT') {
@@ -97,7 +97,7 @@ function nextdir() {
{
const coverageDirectory = path.join(tmpdir.path, nextdir());
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/v8-coverage/spawn-subprocess')
+ require.resolve('../fixtures/v8-coverage/spawn-subprocess'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
if (output.status !== 0) {
console.log(output.stderr.toString());
@@ -117,7 +117,7 @@ function nextdir() {
{
const coverageDirectory = path.join(tmpdir.path, nextdir());
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/v8-coverage/worker')
+ require.resolve('../fixtures/v8-coverage/worker'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
if (output.status !== 0) {
console.log(output.stderr.toString());
@@ -137,7 +137,7 @@ function nextdir() {
{
const coverageDirectory = path.join(tmpdir.path, nextdir());
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/v8-coverage/spawn-subprocess-no-cov')
+ require.resolve('../fixtures/v8-coverage/spawn-subprocess-no-cov'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
if (output.status !== 0) {
console.log(output.stderr.toString());
@@ -153,7 +153,7 @@ function nextdir() {
{
const coverageDirectory = path.join(tmpdir.path, nextdir());
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/v8-coverage/async-hooks')
+ require.resolve('../fixtures/v8-coverage/async-hooks'),
], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } });
if (output.status !== 0) {
console.log(output.stderr.toString());
@@ -172,7 +172,7 @@ function nextdir() {
const coverageDirectory = nextdir();
const absoluteCoverageDirectory = path.join(tmpdir.path, coverageDirectory);
const output = spawnSync(process.execPath, [
- require.resolve('../fixtures/v8-coverage/basic')
+ require.resolve('../fixtures/v8-coverage/basic'),
], {
cwd: tmpdir.path,
env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory }
diff --git a/test/parallel/test-v8-serdes.js b/test/parallel/test-v8-serdes.js
index 9b153739c57270..2ccfc9943a9175 100644
--- a/test/parallel/test-v8-serdes.js
+++ b/test/parallel/test-v8-serdes.js
@@ -21,7 +21,7 @@ const objects = [
undefined,
null,
42,
- circular
+ circular,
];
const hostObject = new (internalBinding('js_stream').JSStream)();
diff --git a/test/parallel/test-v8-stats.js b/test/parallel/test-v8-stats.js
index d79ab84956edf9..2093343859f2af 100644
--- a/test/parallel/test-v8-stats.js
+++ b/test/parallel/test-v8-stats.js
@@ -42,7 +42,7 @@ const expectedHeapSpaces = [
'new_large_object_space',
'new_space',
'old_space',
- 'read_only_space'
+ 'read_only_space',
];
const heapSpaceStatistics = v8.getHeapSpaceStatistics();
const actualHeapSpaceNames = heapSpaceStatistics.map((s) => s.space_name);
diff --git a/test/parallel/test-validators.js b/test/parallel/test-validators.js
index 55c73b2d86d388..9dbf5f9c4599f2 100644
--- a/test/parallel/test-validators.js
+++ b/test/parallel/test-validators.js
@@ -96,7 +96,7 @@ const invalidArgValueError = {
[
-1, {}, [], false, true,
1, Infinity, -Infinity, NaN,
- undefined, null, 1.1
+ undefined, null, 1.1,
].forEach((i) => assert.throws(() => validateString(i, 'name'), {
code: 'ERR_INVALID_ARG_TYPE'
}));
@@ -106,7 +106,7 @@ const invalidArgValueError = {
[
'a', {}, [], false, true,
undefined, null, '', ' ', '0x',
- '-0x1', '-0o1', '-0b1', '0o', '0b'
+ '-0x1', '-0o1', '-0b1', '0o', '0b',
].forEach((i) => assert.throws(() => validateNumber(i, 'name'), {
code: 'ERR_INVALID_ARG_TYPE'
}));
diff --git a/test/parallel/test-vm-context.js b/test/parallel/test-vm-context.js
index 5226f0e6ac0ea2..bcfbb327bf72e8 100644
--- a/test/parallel/test-vm-context.js
+++ b/test/parallel/test-vm-context.js
@@ -82,7 +82,7 @@ const contextifiedObjectError = {
[0.0, nonContextualObjectError],
['', nonContextualObjectError],
[{}, contextifiedObjectError],
- [[], contextifiedObjectError]
+ [[], contextifiedObjectError],
].forEach((e) => {
assert.throws(() => { script.runInContext(e[0]); }, e[1]);
assert.throws(() => { vm.runInContext('', e[0]); }, e[1]);
diff --git a/test/parallel/test-vm-is-context.js b/test/parallel/test-vm-is-context.js
index a47bee7c599c6b..02dc7a596db463 100644
--- a/test/parallel/test-vm-is-context.js
+++ b/test/parallel/test-vm-is-context.js
@@ -25,7 +25,7 @@ const assert = require('assert');
const vm = require('vm');
for (const valToTest of [
- 'string', null, undefined, 8.9, Symbol('sym'), true
+ 'string', null, undefined, 8.9, Symbol('sym'), true,
]) {
assert.throws(() => {
vm.isContext(valToTest);
diff --git a/test/parallel/test-vm-module-errors.js b/test/parallel/test-vm-module-errors.js
index 0d5610d140419f..888250cef84f6f 100644
--- a/test/parallel/test-vm-module-errors.js
+++ b/test/parallel/test-vm-module-errors.js
@@ -24,7 +24,7 @@ async function checkArgType() {
for (const invalidOptions of [
0, 1, null, true, 'str', () => {}, { identifier: 0 }, Symbol.iterator,
- { context: null }, { context: 'hucairz' }, { context: {} }
+ { context: null }, { context: 'hucairz' }, { context: {} },
]) {
assert.throws(() => {
new SourceTextModule('', invalidOptions);
@@ -35,7 +35,7 @@ async function checkArgType() {
}
for (const invalidLinker of [
- 0, 1, undefined, null, true, 'str', {}, Symbol.iterator
+ 0, 1, undefined, null, true, 'str', {}, Symbol.iterator,
]) {
await assert.rejects(async () => {
const m = new SourceTextModule('');
diff --git a/test/parallel/test-vm-module-import-meta.js b/test/parallel/test-vm-module-import-meta.js
index 2972bf548b46e8..4fa285a906086d 100644
--- a/test/parallel/test-vm-module-import-meta.js
+++ b/test/parallel/test-vm-module-import-meta.js
@@ -25,7 +25,7 @@ async function testBasic() {
async function testInvalid() {
for (const invalidValue of [
- null, {}, 0, Symbol.iterator, [], 'string', false
+ null, {}, 0, Symbol.iterator, [], 'string', false,
]) {
assert.throws(() => {
new SourceTextModule('', {
diff --git a/test/parallel/test-vm-sigint-existing-handler.js b/test/parallel/test-vm-sigint-existing-handler.js
index c6072d29d854cc..47e5e80c743023 100644
--- a/test/parallel/test-vm-sigint-existing-handler.js
+++ b/test/parallel/test-vm-sigint-existing-handler.js
@@ -11,7 +11,7 @@ const spawn = require('child_process').spawn;
const methods = [
'runInThisContext',
- 'runInContext'
+ 'runInContext',
];
if (process.argv[2] === 'child') {
diff --git a/test/parallel/test-vm-syntax-error-message.js b/test/parallel/test-vm-syntax-error-message.js
index 5a16239f5653e9..c49ff6aeb1925e 100644
--- a/test/parallel/test-vm-syntax-error-message.js
+++ b/test/parallel/test-vm-syntax-error-message.js
@@ -8,7 +8,7 @@ const p = child_process.spawn(process.execPath, [
'vm = require("vm");' +
'context = vm.createContext({});' +
'try { vm.runInContext("throw new Error(\'boo\')", context); } ' +
- 'catch (e) { console.log(e.message); }'
+ 'catch (e) { console.log(e.message); }',
]);
p.stderr.on('data', common.mustNotCall());
diff --git a/test/parallel/test-vm-syntax-error-stderr.js b/test/parallel/test-vm-syntax-error-stderr.js
index e8d48235cf3ede..dd0667c65302ae 100644
--- a/test/parallel/test-vm-syntax-error-stderr.js
+++ b/test/parallel/test-vm-syntax-error-stderr.js
@@ -9,7 +9,7 @@ const wrong_script = fixtures.path('keys/rsa_cert.crt');
const p = child_process.spawn(process.execPath, [
'-e',
'require(process.argv[1]);',
- wrong_script
+ wrong_script,
]);
p.stdout.on('data', common.mustNotCall());
diff --git a/test/parallel/test-webcrypto-derivebits-ecdh.js b/test/parallel/test-webcrypto-derivebits-ecdh.js
index e86217d0672ac2..cff174003a2c74 100644
--- a/test/parallel/test-webcrypto-derivebits-ecdh.js
+++ b/test/parallel/test-webcrypto-derivebits-ecdh.js
@@ -53,7 +53,7 @@ async function prepareKeys() {
kTests.map(async ({ namedCurve, size, pkcs8, spki, result }) => {
const [
privateKey,
- publicKey
+ publicKey,
] = await Promise.all([
subtle.importKey(
'pkcs8',
@@ -72,7 +72,7 @@ async function prepareKeys() {
namedCurve
},
true,
- ['deriveKey', 'deriveBits'])
+ ['deriveKey', 'deriveBits']),
]);
keys[namedCurve] = {
privateKey,
diff --git a/test/parallel/test-webcrypto-derivebits-hkdf.js b/test/parallel/test-webcrypto-derivebits-hkdf.js
index f1efbb562bb357..630c9f790ca236 100644
--- a/test/parallel/test-webcrypto-derivebits-hkdf.js
+++ b/test/parallel/test-webcrypto-derivebits-hkdf.js
@@ -298,7 +298,7 @@ async function testDeriveBitsBadHash(
},
baseKeys[size], 256), {
message: /Unrecognized name/
- })
+ }),
]);
}
@@ -438,7 +438,7 @@ async function testDeriveKeyBadHash(
keyType,
true,
usages),
- { message: /Unrecognized name/ })
+ { message: /Unrecognized name/ }),
]);
}
diff --git a/test/parallel/test-webcrypto-derivebits-node-dh.js b/test/parallel/test-webcrypto-derivebits-node-dh.js
index 5140c218f09ffc..1498d4fb07a1dc 100644
--- a/test/parallel/test-webcrypto-derivebits-node-dh.js
+++ b/test/parallel/test-webcrypto-derivebits-node-dh.js
@@ -77,7 +77,7 @@ const kTestData = {
async function prepareKeys() {
const [
privateKey,
- publicKey
+ publicKey,
] = await Promise.all([
subtle.importKey(
'pkcs8',
@@ -89,7 +89,7 @@ async function prepareKeys() {
'spki',
Buffer.from(kTestData.spki, 'hex'),
{ name: 'NODE-DH' },
- true, [])
+ true, []),
]);
return {
privateKey,
diff --git a/test/parallel/test-webcrypto-derivebits-pbkdf2.js b/test/parallel/test-webcrypto-derivebits-pbkdf2.js
index e14cad287badaf..94754a195e1b8c 100644
--- a/test/parallel/test-webcrypto-derivebits-pbkdf2.js
+++ b/test/parallel/test-webcrypto-derivebits-pbkdf2.js
@@ -481,7 +481,7 @@ async function testDeriveBitsBadHash(
},
baseKeys[size], 256), {
message: /Unrecognized name/
- })
+ }),
]);
}
@@ -568,7 +568,7 @@ async function testDeriveKeyBadHash(
keyType,
true,
usages),
- { message: /Unrecognized name/ })
+ { message: /Unrecognized name/ }),
]);
}
diff --git a/test/parallel/test-webcrypto-derivebits.js b/test/parallel/test-webcrypto-derivebits.js
index 0556b8c15ceba3..707693f6426e51 100644
--- a/test/parallel/test-webcrypto-derivebits.js
+++ b/test/parallel/test-webcrypto-derivebits.js
@@ -19,7 +19,7 @@ const { internalBinding } = require('internal/test/binding');
async function test(namedCurve) {
const [alice, bob] = await Promise.all([
subtle.generateKey({ name: 'ECDH', namedCurve }, true, ['deriveBits']),
- subtle.generateKey({ name: 'ECDH', namedCurve }, true, ['deriveBits'])
+ subtle.generateKey({ name: 'ECDH', namedCurve }, true, ['deriveBits']),
]);
const [secret1, secret2] = await Promise.all([
@@ -28,7 +28,7 @@ const { internalBinding } = require('internal/test/binding');
}, bob.privateKey, 128),
subtle.deriveBits({
name: 'ECDH', namedCurve, public: bob.publicKey
- }, alice.privateKey, 128)
+ }, alice.privateKey, 128),
]);
assert.deepStrictEqual(secret1, secret2);
@@ -61,7 +61,7 @@ const { internalBinding } = require('internal/test/binding');
'41ef21bdeb0fa87b6b6bfa5c54466aa5bf76cdc2685fb' +
'a4408ea5b94c049fe035649b46f92fdc519374'],
['hello', 'there', 'my friend', 'SHA-384', 128,
- 'e36cf2cf943d8f3a88adb80f478745c3']
+ 'e36cf2cf943d8f3a88adb80f478745c3'],
];
const tests = Promise.all(kTests.map((args) => test(...args)));
@@ -93,7 +93,7 @@ const { internalBinding } = require('internal/test/binding');
'ce7678b4cb16fad88098110a83e71f4483ce73203f7a64' +
'719d293280f780f9fafdcf46925c5c0588b3'],
['hello', 'there', 5, 'SHA-384', 128,
- '201509b012c9cd2fbe7ea938f0c509b3']
+ '201509b012c9cd2fbe7ea938f0c509b3'],
];
const tests = Promise.all(kTests.map((args) => test(...args)));
@@ -122,7 +122,7 @@ if (typeof internalBinding('crypto').ScryptJob === 'function') {
'30ddda6feabaac788eb81cc38f496cd5d9a165d320c537ea05331fe720db1061b3a27' +
'b91a8428e49d44078c1fa395cb1c6db336ba44ccb80faa6d74918769374'],
['hello', 'there', 128,
- '30ddda6feabaac788eb81cc38f496cd5']
+ '30ddda6feabaac788eb81cc38f496cd5'],
];
const tests = Promise.all(kTests.map((args) => test(...args)));
diff --git a/test/parallel/test-webcrypto-derivekey-ecdh.js b/test/parallel/test-webcrypto-derivekey-ecdh.js
index f63c8fd64ed4c8..bdd9bd7588a763 100644
--- a/test/parallel/test-webcrypto-derivekey-ecdh.js
+++ b/test/parallel/test-webcrypto-derivekey-ecdh.js
@@ -48,7 +48,7 @@ async function prepareKeys() {
kTests.map(async ({ namedCurve, size, pkcs8, spki, result }) => {
const [
privateKey,
- publicKey
+ publicKey,
] = await Promise.all([
subtle.importKey(
'pkcs8',
@@ -67,7 +67,7 @@ async function prepareKeys() {
namedCurve
},
true,
- ['deriveKey', 'deriveBits'])
+ ['deriveKey', 'deriveBits']),
]);
keys[namedCurve] = {
privateKey,
diff --git a/test/parallel/test-webcrypto-derivekey.js b/test/parallel/test-webcrypto-derivekey.js
index f072fe01682792..ee48a61f4ac8f5 100644
--- a/test/parallel/test-webcrypto-derivekey.js
+++ b/test/parallel/test-webcrypto-derivekey.js
@@ -19,7 +19,7 @@ const { internalBinding } = require('internal/test/binding');
async function test(namedCurve) {
const [alice, bob] = await Promise.all([
subtle.generateKey({ name: 'ECDH', namedCurve }, true, ['deriveKey']),
- subtle.generateKey({ name: 'ECDH', namedCurve }, true, ['deriveKey'])
+ subtle.generateKey({ name: 'ECDH', namedCurve }, true, ['deriveKey']),
]);
const [secret1, secret2] = await Promise.all([
@@ -34,12 +34,12 @@ const { internalBinding } = require('internal/test/binding');
}, alice.privateKey, {
name: 'AES-CBC',
length: 256
- }, true, ['encrypt'])
+ }, true, ['encrypt']),
]);
const [raw1, raw2] = await Promise.all([
subtle.exportKey('raw', secret1),
- subtle.exportKey('raw', secret2)
+ subtle.exportKey('raw', secret2),
]);
assert.deepStrictEqual(raw1, raw2);
@@ -77,7 +77,7 @@ const { internalBinding } = require('internal/test/binding');
['hello', 'there', 'my friend', 'SHA-256',
'14d93b0ccd99d4f2cbd9fbfe9c830b5b8a43e3e45e32941ef21bdeb0fa87b6b6'],
['hello', 'there', 'my friend', 'SHA-384',
- 'e36cf2cf943d8f3a88adb80f478745c336ac811b1a86d03a7d10eb0b6b52295c']
+ 'e36cf2cf943d8f3a88adb80f478745c336ac811b1a86d03a7d10eb0b6b52295c'],
];
const tests = Promise.all(kTests.map((args) => test(...args)));
@@ -113,7 +113,7 @@ const { internalBinding } = require('internal/test/binding');
['hello', 'there', 10, 'SHA-256',
'f72d1cf4853fffbd16a42751765d11f8dc7939498ee7b7ce7678b4cb16fad880'],
['hello', 'there', 5, 'SHA-384',
- '201509b012c9cd2fbe7ea938f0c509b36ecb140f38bf9130e96923f55f46756d']
+ '201509b012c9cd2fbe7ea938f0c509b36ecb140f38bf9130e96923f55f46756d'],
];
const tests = Promise.all(kTests.map((args) => test(...args)));
@@ -145,7 +145,7 @@ if (typeof internalBinding('crypto').ScryptJob === 'function') {
const kTests = [
['hello', 'there',
- '30ddda6feabaac788eb81cc38f496cd5d9a165d320c537ea05331fe720db1061']
+ '30ddda6feabaac788eb81cc38f496cd5d9a165d320c537ea05331fe720db1061'],
];
const tests = Promise.all(kTests.map((args) => test(...args)));
diff --git a/test/parallel/test-webcrypto-digest.js b/test/parallel/test-webcrypto-digest.js
index 327a7ba32a9990..78b12ea6a5574c 100644
--- a/test/parallel/test-webcrypto-digest.js
+++ b/test/parallel/test-webcrypto-digest.js
@@ -14,7 +14,7 @@ const kTests = [
['SHA-1', 'sha1', 160],
['SHA-256', 'sha256', 256],
['SHA-384', 'sha384', 384],
- ['SHA-512', 'sha512', 512]
+ ['SHA-512', 'sha512', 512],
];
// Empty hash just works, not checking result
diff --git a/test/parallel/test-webcrypto-ed25519-ed448.js b/test/parallel/test-webcrypto-ed25519-ed448.js
index 80b9b9ebe90cf7..91e0fb8bf3fe0d 100644
--- a/test/parallel/test-webcrypto-ed25519-ed448.js
+++ b/test/parallel/test-webcrypto-ed25519-ed448.js
@@ -50,7 +50,7 @@ async function test1(namedCurve) {
Promise.all([
test1('NODE-ED25519'),
- test1('NODE-ED448')
+ test1('NODE-ED448'),
]).then(common.mustCall());
assert.rejects(
@@ -182,7 +182,7 @@ const testVectors = {
'aa5371b1508f9f4528ecea23c436d94b5e8fcd4f681e30a6ac00a9704a188a03',
'hex'),
crv: 'Ed25519',
- }
+ },
],
'NODE-ED448': [
{
@@ -238,7 +238,7 @@ const testVectors = {
'1068df7254c0cdc129cbe62db2dc957dbb47b51fd3f213fb8698f064774250a5' +
'028961c9bf8ffd973fe5d5c206492b140e00', 'hex'),
crv: 'Ed448',
- }
+ },
]
};
@@ -265,15 +265,15 @@ async function test2(namedCurve) {
namedCurve,
public: true
},
- true, ['verify'])
+ true, ['verify']),
]);
const [
rawKey1,
- rawKey2
+ rawKey2,
] = await Promise.all([
subtle.exportKey('raw', privateKey),
- subtle.exportKey('raw', publicKey)
+ subtle.exportKey('raw', publicKey),
]);
assert.deepStrictEqual(Buffer.from(rawKey1), vector.privateKey);
assert.deepStrictEqual(Buffer.from(rawKey2), vector.publicKey);
@@ -295,10 +295,10 @@ async function test2(namedCurve) {
const [
publicKeyJwk,
- privateKeyJwk
+ privateKeyJwk,
] = await Promise.all([
subtle.exportKey('jwk', publicKey),
- subtle.exportKey('jwk', privateKey)
+ subtle.exportKey('jwk', privateKey),
]);
assert.strictEqual(publicKeyJwk.kty, 'OKP');
assert.strictEqual(privateKeyJwk.kty, 'OKP');
@@ -318,7 +318,7 @@ async function test2(namedCurve) {
Promise.all([
test2('NODE-ED25519'),
- test2('NODE-ED448')
+ test2('NODE-ED448'),
]).then(common.mustCall());
assert.rejects(
diff --git a/test/parallel/test-webcrypto-encrypt-decrypt-rsa.js b/test/parallel/test-webcrypto-encrypt-decrypt-rsa.js
index c75e25bf10bc10..151eebd36c9765 100644
--- a/test/parallel/test-webcrypto-encrypt-decrypt-rsa.js
+++ b/test/parallel/test-webcrypto-encrypt-decrypt-rsa.js
@@ -23,7 +23,7 @@ async function importVectorKey(
subtle.importKey(
'spki', publicKeyBuffer, { name, hash }, false, publicUsages),
subtle.importKey(
- 'pkcs8', privateKeyBuffer, { name, hash }, false, privateUsages)
+ 'pkcs8', privateKeyBuffer, { name, hash }, false, privateUsages),
]);
return { publicKey, privateKey };
diff --git a/test/parallel/test-webcrypto-export-import-dsa.js b/test/parallel/test-webcrypto-export-import-dsa.js
index e6bcdebc5bbdc7..3fddd9dd9c4559 100644
--- a/test/parallel/test-webcrypto-export-import-dsa.js
+++ b/test/parallel/test-webcrypto-export-import-dsa.js
@@ -14,7 +14,7 @@ const hashes = [
'SHA-1',
'SHA-256',
'SHA-384',
- 'SHA-512'
+ 'SHA-512',
];
const keyData = {
@@ -115,7 +115,7 @@ const testVectors = [
name: 'NODE-DSA',
privateUsages: ['sign'],
publicUsages: ['verify']
- }
+ },
];
(async function() {
diff --git a/test/parallel/test-webcrypto-export-import-ec.js b/test/parallel/test-webcrypto-export-import-ec.js
index 190f7ffda2c2cb..31ab2c09cdb1f9 100644
--- a/test/parallel/test-webcrypto-export-import-ec.js
+++ b/test/parallel/test-webcrypto-export-import-ec.js
@@ -94,7 +94,7 @@ const testVectors = [
name: 'ECDH',
privateUsages: ['deriveKey', 'deriveBits'],
publicUsages: []
- }
+ },
];
async function testImportSpki({ name, publicUsages }, namedCurve, extractable) {
@@ -173,7 +173,7 @@ async function testImportJwk(
const [
publicKey,
- privateKey
+ privateKey,
] = await Promise.all([
subtle.importKey(
'jwk',
@@ -210,7 +210,7 @@ async function testImportJwk(
},
{ name, namedCurve },
extractable,
- privateUsages)
+ privateUsages),
]);
assert.strictEqual(publicKey.type, 'public');
@@ -228,10 +228,10 @@ async function testImportJwk(
// Test the round trip
const [
pubJwk,
- pvtJwk
+ pvtJwk,
] = await Promise.all([
subtle.exportKey('jwk', publicKey),
- subtle.exportKey('jwk', privateKey)
+ subtle.exportKey('jwk', privateKey),
]);
assert.deepStrictEqual(pubJwk.key_ops, publicUsages);
diff --git a/test/parallel/test-webcrypto-export-import-rsa.js b/test/parallel/test-webcrypto-export-import-rsa.js
index 1caf60f156c945..29d50aa9dd9b18 100644
--- a/test/parallel/test-webcrypto-export-import-rsa.js
+++ b/test/parallel/test-webcrypto-export-import-rsa.js
@@ -14,7 +14,7 @@ const hashes = [
'SHA-1',
'SHA-256',
'SHA-384',
- 'SHA-512'
+ 'SHA-512',
];
const keyData = {
@@ -389,7 +389,7 @@ async function testImportJwk(
{ ...jwk, alg: `PS${hash.substring(4)}` },
{ name, hash },
extractable,
- privateUsages)
+ privateUsages),
]);
assert.strictEqual(publicKey.type, 'public');
@@ -408,10 +408,10 @@ async function testImportJwk(
if (extractable) {
const [
pubJwk,
- pvtJwk
+ pvtJwk,
] = await Promise.all([
subtle.exportKey('jwk', publicKey),
- subtle.exportKey('jwk', privateKey)
+ subtle.exportKey('jwk', privateKey),
]);
assert.strictEqual(pubJwk.kty, 'RSA');
@@ -460,7 +460,7 @@ const testVectors = [
name: 'RSASSA-PKCS1-V1_5',
privateUsages: ['sign'],
publicUsages: ['verify']
- }
+ },
];
(async function() {
diff --git a/test/parallel/test-webcrypto-export-import.js b/test/parallel/test-webcrypto-export-import.js
index 93d8967f293551..d7db433b364011 100644
--- a/test/parallel/test-webcrypto-export-import.js
+++ b/test/parallel/test-webcrypto-export-import.js
@@ -153,12 +153,12 @@ const { subtle, getRandomValues } = require('crypto').webcrypto;
spki,
pkcs8,
publicJwk,
- privateJwk
+ privateJwk,
] = await Promise.all([
subtle.exportKey('spki', publicKey),
subtle.exportKey('pkcs8', privateKey),
subtle.exportKey('jwk', publicKey),
- subtle.exportKey('jwk', privateKey)
+ subtle.exportKey('jwk', privateKey),
]);
assert(spki);
@@ -170,7 +170,7 @@ const { subtle, getRandomValues } = require('crypto').webcrypto;
importedSpkiPublicKey,
importedPkcs8PrivateKey,
importedJwkPublicKey,
- importedJwkPrivateKey
+ importedJwkPrivateKey,
] = await Promise.all([
subtle.importKey('spki', spki, {
name: 'RSA-PSS',
@@ -211,12 +211,12 @@ const { subtle, getRandomValues } = require('crypto').webcrypto;
spki,
pkcs8,
publicJwk,
- privateJwk
+ privateJwk,
] = await Promise.all([
subtle.exportKey('spki', publicKey),
subtle.exportKey('pkcs8', privateKey),
subtle.exportKey('jwk', publicKey),
- subtle.exportKey('jwk', privateKey)
+ subtle.exportKey('jwk', privateKey),
]);
assert(spki);
@@ -228,7 +228,7 @@ const { subtle, getRandomValues } = require('crypto').webcrypto;
importedSpkiPublicKey,
importedPkcs8PrivateKey,
importedJwkPublicKey,
- importedJwkPrivateKey
+ importedJwkPrivateKey,
] = await Promise.all([
subtle.importKey('spki', spki, {
name: 'ECDSA',
diff --git a/test/parallel/test-webcrypto-keygen.js b/test/parallel/test-webcrypto-keygen.js
index 4aa3cc4cf28401..1e3bcec6be4370 100644
--- a/test/parallel/test-webcrypto-keygen.js
+++ b/test/parallel/test-webcrypto-keygen.js
@@ -16,7 +16,7 @@ const allUsages = [
'deriveBits',
'deriveKey',
'wrapKey',
- 'unwrapKey'
+ 'unwrapKey',
];
const vectors = {
'AES-CTR': {
@@ -25,7 +25,7 @@ const vectors = {
'encrypt',
'decrypt',
'wrapKey',
- 'unwrapKey'
+ 'unwrapKey',
],
mandatoryUsages: []
},
@@ -35,7 +35,7 @@ const vectors = {
'encrypt',
'decrypt',
'wrapKey',
- 'unwrapKey'
+ 'unwrapKey',
],
mandatoryUsages: []
},
@@ -45,7 +45,7 @@ const vectors = {
'encrypt',
'decrypt',
'wrapKey',
- 'unwrapKey'
+ 'unwrapKey',
],
mandatoryUsages: []
},
@@ -53,7 +53,7 @@ const vectors = {
algorithm: { length: 256 },
usages: [
'wrapKey',
- 'unwrapKey'
+ 'unwrapKey',
],
mandatoryUsages: []
},
@@ -61,7 +61,7 @@ const vectors = {
algorithm: { length: 256, hash: 'SHA-256' },
usages: [
'sign',
- 'verify'
+ 'verify',
],
mandatoryUsages: []
},
@@ -73,7 +73,7 @@ const vectors = {
},
usages: [
'sign',
- 'verify'
+ 'verify',
],
mandatoryUsages: ['sign'],
},
@@ -85,7 +85,7 @@ const vectors = {
},
usages: [
'sign',
- 'verify'
+ 'verify',
],
mandatoryUsages: ['sign']
},
@@ -99,18 +99,18 @@ const vectors = {
'encrypt',
'decrypt',
'wrapKey',
- 'unwrapKey'
+ 'unwrapKey',
],
mandatoryUsages: [
'decrypt',
- 'unwrapKey'
+ 'unwrapKey',
]
},
'ECDSA': {
algorithm: { namedCurve: 'P-521' },
usages: [
'sign',
- 'verify'
+ 'verify',
],
mandatoryUsages: ['sign']
},
@@ -118,22 +118,22 @@ const vectors = {
algorithm: { namedCurve: 'P-521' },
usages: [
'deriveKey',
- 'deriveBits'
+ 'deriveBits',
],
mandatoryUsages: [
'deriveKey',
- 'deriveBits'
+ 'deriveBits',
]
},
'NODE-DSA': {
algorithm: { modulusLength: 1024, hash: 'SHA-256' },
usages: [
'sign',
- 'verify'
+ 'verify',
],
mandatoryUsages: [
'sign',
- 'verify'
+ 'verify',
]
}
};
@@ -170,7 +170,7 @@ const vectors = {
{
name: 'EC',
namedCurve: 'P521'
- }
+ },
].map(async (algorithm) => test(algorithm));
Promise.all(tests).then(common.mustCall());
@@ -273,7 +273,7 @@ const vectors = {
{},
1,
[],
- new Uint32Array(2)
+ new Uint32Array(2),
].map((publicExponent) => {
return assert.rejects(
subtle.generateKey(
@@ -322,7 +322,7 @@ const vectors = {
Buffer.from([1, 0, 1]),
'SHA-256',
['sign'],
- ['verify']
+ ['verify'],
],
[
'RSA-PSS',
@@ -330,7 +330,7 @@ const vectors = {
Buffer.from([1, 0, 1]),
'SHA-512',
['sign'],
- ['verify']
+ ['verify'],
],
[
'RSA-OAEP',
@@ -338,8 +338,8 @@ const vectors = {
Buffer.from([3]),
'SHA-384',
['decrypt', 'unwrapKey'],
- ['encrypt', 'wrapKey']
- ]
+ ['encrypt', 'wrapKey'],
+ ],
];
const tests = kTests.map((args) => test(...args));
@@ -392,26 +392,26 @@ const vectors = {
'ECDSA',
'P-384',
['sign'],
- ['verify']
+ ['verify'],
],
[
'ECDSA',
'P-521',
['sign'],
- ['verify']
+ ['verify'],
],
[
'ECDH',
'P-384',
['deriveKey', 'deriveBits'],
- []
+ [],
],
[
'ECDH',
'P-521',
['deriveKey', 'deriveBits'],
- []
- ]
+ [],
+ ],
];
const tests = kTests.map((args) => test(...args));
@@ -616,8 +616,8 @@ const vectors = {
1024,
'SHA-256',
['sign'],
- ['verify']
- ]
+ ['verify'],
+ ],
];
const tests = kTests.map((args) => test(...args));
diff --git a/test/parallel/test-webcrypto-sign-verify-ecdsa.js b/test/parallel/test-webcrypto-sign-verify-ecdsa.js
index d60b5844cd9e8e..2f8f3a2fd229bd 100644
--- a/test/parallel/test-webcrypto-sign-verify-ecdsa.js
+++ b/test/parallel/test-webcrypto-sign-verify-ecdsa.js
@@ -22,7 +22,7 @@ async function testVerify({ name,
noVerifyPublicKey,
privateKey,
hmacKey,
- rsaKeys
+ rsaKeys,
] = await Promise.all([
subtle.importKey(
'spki',
@@ -54,7 +54,7 @@ async function testVerify({ name,
hash: 'SHA-256',
},
false,
- ['sign'])
+ ['sign']),
]);
assert(await subtle.verify({ name, hash }, publicKey, signature, plaintext));
@@ -171,7 +171,7 @@ async function testSign({ name,
hash: 'SHA-256',
},
false,
- ['sign'])
+ ['sign']),
]);
{
diff --git a/test/parallel/test-webcrypto-sign-verify-hmac.js b/test/parallel/test-webcrypto-sign-verify-hmac.js
index de9a995fad29c4..b0eccad85f0160 100644
--- a/test/parallel/test-webcrypto-sign-verify-hmac.js
+++ b/test/parallel/test-webcrypto-sign-verify-hmac.js
@@ -18,7 +18,7 @@ async function testVerify({ hash,
const [
key,
noVerifyKey,
- rsaKeys
+ rsaKeys,
] = await Promise.all([
subtle.importKey(
'raw',
@@ -40,7 +40,7 @@ async function testVerify({ hash,
hash: 'SHA-256',
},
false,
- ['sign'])
+ ['sign']),
]);
assert(await subtle.verify({ name, hash }, key, signature, plaintext));
@@ -133,7 +133,7 @@ async function testSign({ hash,
hash: 'SHA-256',
},
false,
- ['sign'])
+ ['sign']),
]);
{
diff --git a/test/parallel/test-webcrypto-sign-verify-node-dsa.js b/test/parallel/test-webcrypto-sign-verify-node-dsa.js
index d14adf4a43b5a4..73b006b9236249 100644
--- a/test/parallel/test-webcrypto-sign-verify-node-dsa.js
+++ b/test/parallel/test-webcrypto-sign-verify-node-dsa.js
@@ -21,7 +21,7 @@ async function testVerify({ algorithm,
noVerifyPublicKey,
privateKey,
hmacKey,
- wrongKeys
+ wrongKeys,
] = await Promise.all([
subtle.importKey(
'spki',
@@ -52,7 +52,7 @@ async function testVerify({ algorithm,
hash: 'SHA-256',
},
false,
- ['sign'])
+ ['sign']),
]);
assert(await subtle.verify(algorithm, publicKey, signature, plaintext));
@@ -168,7 +168,7 @@ async function testSign({
hash: 'SHA-256',
},
false,
- ['sign'])
+ ['sign']),
]);
{
diff --git a/test/parallel/test-webcrypto-sign-verify-rsa.js b/test/parallel/test-webcrypto-sign-verify-rsa.js
index 5c70857d168c73..60815c5ea0451d 100644
--- a/test/parallel/test-webcrypto-sign-verify-rsa.js
+++ b/test/parallel/test-webcrypto-sign-verify-rsa.js
@@ -24,7 +24,7 @@ async function testVerify({
noVerifyPublicKey,
privateKey,
hmacKey,
- ecdsaKeys
+ ecdsaKeys,
] = await Promise.all([
subtle.importKey(
'spki',
@@ -55,7 +55,7 @@ async function testVerify({
hash: 'SHA-256',
},
false,
- ['sign'])
+ ['sign']),
]);
assert(await subtle.verify(algorithm, publicKey, signature, plaintext));
@@ -140,7 +140,7 @@ async function testSign({
noSignPrivateKey,
privateKey,
hmacKey,
- ecdsaKeys
+ ecdsaKeys,
] = await Promise.all([
subtle.importKey(
'spki',
@@ -171,7 +171,7 @@ async function testSign({
hash: 'SHA-256',
},
false,
- ['sign'])
+ ['sign']),
]);
{
diff --git a/test/parallel/test-webcrypto-wrap-unwrap.js b/test/parallel/test-webcrypto-wrap-unwrap.js
index d0c46737797a29..02a6cf3cbb16b9 100644
--- a/test/parallel/test-webcrypto-wrap-unwrap.js
+++ b/test/parallel/test-webcrypto-wrap-unwrap.js
@@ -152,7 +152,7 @@ async function generateKeysToWrap() {
},
usages: ['sign', 'verify'],
pair: false,
- }
+ },
];
const allkeys = await Promise.all(parameters.map(async (params) => {
@@ -173,7 +173,7 @@ async function generateKeysToWrap() {
algorithm: params.algorithm,
usages: params.privateUsages,
key: keys.privateKey,
- }
+ },
];
}
diff --git a/test/parallel/test-webcrypto-x25519-x448.js b/test/parallel/test-webcrypto-x25519-x448.js
index 8668964524eb45..cd079b5fb80a5e 100644
--- a/test/parallel/test-webcrypto-x25519-x448.js
+++ b/test/parallel/test-webcrypto-x25519-x448.js
@@ -200,10 +200,10 @@ async function test2(namedCurve, length) {
const [
publicKeyJwk,
- privateKeyJwk
+ privateKeyJwk,
] = await Promise.all([
subtle.exportKey('jwk', publicKey1),
- subtle.exportKey('jwk', privateKey1)
+ subtle.exportKey('jwk', privateKey1),
]);
assert.strictEqual(publicKeyJwk.kty, 'OKP');
assert.strictEqual(privateKeyJwk.kty, 'OKP');
diff --git a/test/parallel/test-whatwg-encoding-custom-api-basics.js b/test/parallel/test-whatwg-encoding-custom-api-basics.js
index c39bce5d74ee99..71b573a8df962e 100644
--- a/test/parallel/test-whatwg-encoding-custom-api-basics.js
+++ b/test/parallel/test-whatwg-encoding-custom-api-basics.js
@@ -28,7 +28,7 @@ const sample = 'z\xA2\u6C34\uD834\uDD1E\uF8FF\uDBFF\uDFFD\uFFFE';
0x7A, 0xC2, 0xA2, 0xE6, 0xB0, 0xB4,
0xF0, 0x9D, 0x84, 0x9E, 0xEF, 0xA3,
0xBF, 0xF4, 0x8F, 0xBF, 0xBD, 0xEF,
- 0xBF, 0xBE
+ 0xBF, 0xBE,
];
const encoded = new TextEncoder().encode(string);
assert.deepStrictEqual([].slice.call(encoded), bytes);
@@ -46,7 +46,7 @@ testDecodeSample(
[
0x7A, 0x00, 0xA2, 0x00, 0x34, 0x6C,
0x34, 0xD8, 0x1E, 0xDD, 0xFF, 0xF8,
- 0xFF, 0xDB, 0xFD, 0xDF, 0xFE, 0xFF
+ 0xFF, 0xDB, 0xFD, 0xDF, 0xFE, 0xFF,
]
);
@@ -56,6 +56,6 @@ testDecodeSample(
[
0x7A, 0x00, 0xA2, 0x00, 0x34, 0x6C,
0x34, 0xD8, 0x1E, 0xDD, 0xFF, 0xF8,
- 0xFF, 0xDB, 0xFD, 0xDF, 0xFE, 0xFF
+ 0xFF, 0xDB, 0xFD, 0xDF, 0xFE, 0xFF,
]
);
diff --git a/test/parallel/test-whatwg-encoding-custom-fatal-streaming.js b/test/parallel/test-whatwg-encoding-custom-fatal-streaming.js
index aed0f14ef7fcae..164088270c3e90 100644
--- a/test/parallel/test-whatwg-encoding-custom-fatal-streaming.js
+++ b/test/parallel/test-whatwg-encoding-custom-fatal-streaming.js
@@ -13,7 +13,7 @@ if (!common.hasIntl)
[
{ encoding: 'utf-8', sequence: [0xC0] },
{ encoding: 'utf-16le', sequence: [0x00] },
- { encoding: 'utf-16be', sequence: [0x00] }
+ { encoding: 'utf-16be', sequence: [0x00] },
].forEach((testCase) => {
const data = new Uint8Array([testCase.sequence]);
assert.throws(
diff --git a/test/parallel/test-whatwg-encoding-custom-internals.js b/test/parallel/test-whatwg-encoding-custom-internals.js
index 64bf6abe0d97be..c810b43b1ae447 100644
--- a/test/parallel/test-whatwg-encoding-custom-internals.js
+++ b/test/parallel/test-whatwg-encoding-custom-internals.js
@@ -13,16 +13,16 @@ const { getEncodingFromLabel } = require('internal/encoding');
const mappings = {
'utf-8': [
'unicode-1-1-utf-8',
- 'utf8'
+ 'utf8',
],
'utf-16be': [],
'utf-16le': [
- 'utf-16'
+ 'utf-16',
],
'ibm866': [
'866',
'cp866',
- 'csibm866'
+ 'csibm866',
],
'iso-8859-2': [
'csisolatin2',
@@ -32,7 +32,7 @@ const { getEncodingFromLabel } = require('internal/encoding');
'iso_8859-2',
'iso_8859-2:1987',
'l2',
- 'latin2'
+ 'latin2',
],
'iso-8859-3': [
'csisolatin3',
@@ -42,7 +42,7 @@ const { getEncodingFromLabel } = require('internal/encoding');
'iso_8859-3',
'iso_8859-3:1988',
'l3',
- 'latin3'
+ 'latin3',
],
'iso-8859-4': [
'csisolatin4',
@@ -52,7 +52,7 @@ const { getEncodingFromLabel } = require('internal/encoding');
'iso_8859-4',
'iso_8859-4:1988',
'l4',
- 'latin4'
+ 'latin4',
],
'iso-8859-5': [
'csisolatincyrillic',
@@ -61,7 +61,7 @@ const { getEncodingFromLabel } = require('internal/encoding');
'iso8859-5',
'iso88595',
'iso_8859-5',
- 'iso_8859-5:1988'
+ 'iso_8859-5:1988',
],
'iso-8859-6': [
'arabic',
@@ -76,7 +76,7 @@ const { getEncodingFromLabel } = require('internal/encoding');
'iso8859-6',
'iso88596',
'iso_8859-6',
- 'iso_8859-6:1987'
+ 'iso_8859-6:1987',
],
'iso-8859-7': [
'csisolatingreek',
@@ -89,7 +89,7 @@ const { getEncodingFromLabel } = require('internal/encoding');
'iso88597',
'iso_8859-7',
'iso_8859-7:1987',
- 'sun_eu_greek'
+ 'sun_eu_greek',
],
'iso-8859-8': [
'csiso88598e',
@@ -101,11 +101,11 @@ const { getEncodingFromLabel } = require('internal/encoding');
'iso88598',
'iso_8859-8',
'iso_8859-8:1988',
- 'visual'
+ 'visual',
],
'iso-8859-8-i': [
'csiso88598i',
- 'logical'
+ 'logical',
],
'iso-8859-10': [
'csisolatin6',
@@ -113,51 +113,51 @@ const { getEncodingFromLabel } = require('internal/encoding');
'iso8859-10',
'iso885910',
'l6',
- 'latin6'
+ 'latin6',
],
'iso-8859-13': [
'iso8859-13',
- 'iso885913'
+ 'iso885913',
],
'iso-8859-14': [
'iso8859-14',
- 'iso885914'
+ 'iso885914',
],
'iso-8859-15': [
'csisolatin9',
'iso8859-15',
'iso885915',
'iso_8859-15',
- 'l9'
+ 'l9',
],
'koi8-r': [
'cskoi8r',
'koi',
'koi8',
- 'koi8_r'
+ 'koi8_r',
],
'koi8-u': [
- 'koi8-ru'
+ 'koi8-ru',
],
'macintosh': [
'csmacintosh',
'mac',
- 'x-mac-roman'
+ 'x-mac-roman',
],
'windows-874': [
'dos-874',
'iso-8859-11',
'iso8859-11',
'iso885911',
- 'tis-620'
+ 'tis-620',
],
'windows-1250': [
'cp1250',
- 'x-cp1250'
+ 'x-cp1250',
],
'windows-1251': [
'cp1251',
- 'x-cp1251'
+ 'x-cp1251',
],
'windows-1252': [
'ansi_x3.4-1968',
@@ -175,11 +175,11 @@ const { getEncodingFromLabel } = require('internal/encoding');
'l1',
'latin1',
'us-ascii',
- 'x-cp1252'
+ 'x-cp1252',
],
'windows-1253': [
'cp1253',
- 'x-cp1253'
+ 'x-cp1253',
],
'windows-1254': [
'cp1254',
@@ -192,26 +192,26 @@ const { getEncodingFromLabel } = require('internal/encoding');
'iso_8859-9:1989',
'l5',
'latin5',
- 'x-cp1254'
+ 'x-cp1254',
],
'windows-1255': [
'cp1255',
- 'x-cp1255'
+ 'x-cp1255',
],
'windows-1256': [
'cp1256',
- 'x-cp1256'
+ 'x-cp1256',
],
'windows-1257': [
'cp1257',
- 'x-cp1257'
+ 'x-cp1257',
],
'windows-1258': [
'cp1258',
- 'x-cp1258'
+ 'x-cp1258',
],
'x-mac-cyrillic': [
- 'x-mac-ukrainian'
+ 'x-mac-ukrainian',
],
'gbk': [
'chinese',
@@ -221,21 +221,21 @@ const { getEncodingFromLabel } = require('internal/encoding');
'gb_2312',
'gb_2312-80',
'iso-ir-58',
- 'x-gbk'
+ 'x-gbk',
],
'gb18030': [ ],
'big5': [
'big5-hkscs',
'cn-big5',
'csbig5',
- 'x-x-big5'
+ 'x-x-big5',
],
'euc-jp': [
'cseucpkdfmtjapanese',
- 'x-euc-jp'
+ 'x-euc-jp',
],
'iso-2022-jp': [
- 'csiso2022jp'
+ 'csiso2022jp',
],
'shift_jis': [
'csshiftjis',
@@ -244,7 +244,7 @@ const { getEncodingFromLabel } = require('internal/encoding');
'shift-jis',
'sjis',
'windows-31j',
- 'x-sjis'
+ 'x-sjis',
],
'euc-kr': [
' euc-kr \t',
@@ -257,7 +257,7 @@ const { getEncodingFromLabel } = require('internal/encoding');
'ks_c_5601-1989',
'ksc5601',
'ksc_5601',
- 'windows-949'
+ 'windows-949',
]
};
Object.entries(mappings).forEach((i) => {
diff --git a/test/parallel/test-whatwg-encoding-custom-textdecoder-api-invalid-label.js b/test/parallel/test-whatwg-encoding-custom-textdecoder-api-invalid-label.js
index 3323f5b3d126f4..a701d79a285a16 100644
--- a/test/parallel/test-whatwg-encoding-custom-textdecoder-api-invalid-label.js
+++ b/test/parallel/test-whatwg-encoding-custom-textdecoder-api-invalid-label.js
@@ -11,7 +11,7 @@ const assert = require('assert');
'utf8',
'utf-16be',
'utf-16le',
- 'utf-16'
+ 'utf-16',
].forEach((i) => {
['\u0000', '\u000b', '\u00a0', '\u2028', '\u2029'].forEach((ws) => {
assert.throws(
diff --git a/test/parallel/test-whatwg-encoding-custom-textdecoder-ignorebom.js b/test/parallel/test-whatwg-encoding-custom-textdecoder-ignorebom.js
index 9f6368dcd5e93f..94fc3318d1f15e 100644
--- a/test/parallel/test-whatwg-encoding-custom-textdecoder-ignorebom.js
+++ b/test/parallel/test-whatwg-encoding-custom-textdecoder-ignorebom.js
@@ -15,7 +15,7 @@ const cases = [
{
encoding: 'utf-16le',
bytes: [0xFF, 0xFE, 0x61, 0x00, 0x62, 0x00, 0x63, 0x00]
- }
+ },
];
cases.forEach((testCase) => {
diff --git a/test/parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js b/test/parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js
index f4d9ef8d42dced..2a8eac5f187406 100644
--- a/test/parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js
+++ b/test/parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js
@@ -40,7 +40,7 @@ const bad = [
input: [0x00, 0xdc, 0x00, 0xd8],
expected: '\uFFFD\uFFFD',
name: 'swapped surrogate pair'
- }
+ },
];
bad.forEach((t) => {
diff --git a/test/parallel/test-whatwg-url-custom-parsing.js b/test/parallel/test-whatwg-url-custom-parsing.js
index 6d9a9a816eff83..a07d776d0a25cc 100644
--- a/test/parallel/test-whatwg-url-custom-parsing.js
+++ b/test/parallel/test-whatwg-url-custom-parsing.js
@@ -29,7 +29,7 @@ const typeFailures = [
{ input: new RegExp() },
{ input: 'test', base: null },
{ input: 'http://nodejs.org', base: null },
- { input: () => {} }
+ { input: () => {} },
];
// See https://github.com/w3c/web-platform-tests/pull/10955
diff --git a/test/parallel/test-whatwg-url-custom-properties.js b/test/parallel/test-whatwg-url-custom-properties.js
index cdbd2f6bdd4424..68e936c6c7792c 100644
--- a/test/parallel/test-whatwg-url-custom-properties.js
+++ b/test/parallel/test-whatwg-url-custom-properties.js
@@ -140,7 +140,7 @@ assert.strictEqual(url.searchParams, oldParams);
{ expected: 'wss://example.org', url: 'wss://example.org/foo' },
{ expected: 'null', url: 'gopher://gopher.quux.org/1/' },
{ expected: 'null', url: 'file:///tmp/mock/path' },
- { expected: 'null', url: 'npm://nodejs/rules' }
+ { expected: 'null', url: 'npm://nodejs/rules' },
].forEach((test) => {
assert.strictEqual(new URL(test.url).origin, test.expected);
});
diff --git a/test/parallel/test-worker-cleanexit-with-moduleload.js b/test/parallel/test-worker-cleanexit-with-moduleload.js
index 0de9ad71d3dc7b..f2e8ad786f1a88 100644
--- a/test/parallel/test-worker-cleanexit-with-moduleload.js
+++ b/test/parallel/test-worker-cleanexit-with-moduleload.js
@@ -10,7 +10,7 @@ const common = require('../common');
const { Worker } = require('worker_threads');
const modules = [ 'fs', 'assert', 'async_hooks', 'buffer', 'child_process',
- 'net', 'http', 'os', 'path', 'v8', 'vm'
+ 'net', 'http', 'os', 'path', 'v8', 'vm',
];
if (common.hasCrypto) {
modules.push('https');
diff --git a/test/parallel/test-worker-debug.js b/test/parallel/test-worker-debug.js
index ba520b16867158..758d7acfc3a99f 100644
--- a/test/parallel/test-worker-debug.js
+++ b/test/parallel/test-worker-debug.js
@@ -144,7 +144,7 @@ async function testBasicWorkerDebug(session, post) {
const workerSession = new WorkerSession(session, sessionId);
const contextEventPromises = Promise.all([
waitForEvent(workerSession, 'Runtime.executionContextCreated'),
- waitForEvent(workerSession, 'Runtime.executionContextDestroyed')
+ waitForEvent(workerSession, 'Runtime.executionContextDestroyed'),
]);
const consolePromise = waitForEvent(workerSession, 'Runtime.consoleAPICalled')
.then((notification) => notification.params.args[0].value);
@@ -219,7 +219,7 @@ async function testWaitForDisconnectInWorker(session, post) {
const attached = [
waitForWorkerAttach(session),
- waitForWorkerAttach(sessionWithoutWaiting)
+ waitForWorkerAttach(sessionWithoutWaiting),
];
let worker = null;
diff --git a/test/parallel/test-worker-message-event.js b/test/parallel/test-worker-message-event.js
index bbc2e3b612686e..8ea08145a1d0a2 100644
--- a/test/parallel/test-worker-message-event.js
+++ b/test/parallel/test-worker-message-event.js
@@ -11,42 +11,42 @@ const dummyPort = new MessageChannel().port1;
{
type: 'message', data: null, origin: '',
lastEventId: '', source: null, ports: []
- }
+ },
],
[
['message', { data: undefined, origin: 'foo' }],
{
type: 'message', data: null, origin: 'foo',
lastEventId: '', source: null, ports: []
- }
+ },
],
[
['message', { data: 2, origin: 1, lastEventId: 0 }],
{
type: 'message', data: 2, origin: '1',
lastEventId: '0', source: null, ports: []
- }
+ },
],
[
['message', { lastEventId: 'foo' }],
{
type: 'message', data: null, origin: '',
lastEventId: 'foo', source: null, ports: []
- }
+ },
],
[
['messageerror', { lastEventId: 'foo', source: dummyPort }],
{
type: 'messageerror', data: null, origin: '',
lastEventId: 'foo', source: dummyPort, ports: []
- }
+ },
],
[
['message', { ports: [dummyPort], source: null }],
{
type: 'message', data: null, origin: '',
lastEventId: '', source: null, ports: [dummyPort]
- }
+ },
],
]) {
const ev = new MessageEvent(...args);
diff --git a/test/parallel/test-worker-message-port-multiple-sharedarraybuffers.js b/test/parallel/test-worker-message-port-multiple-sharedarraybuffers.js
index eb68236e4d6788..efec7f0190d2e5 100644
--- a/test/parallel/test-worker-message-port-multiple-sharedarraybuffers.js
+++ b/test/parallel/test-worker-message-port-multiple-sharedarraybuffers.js
@@ -7,7 +7,7 @@ const { MessageChannel } = require('worker_threads');
const obj = [
[ new SharedArrayBuffer(0), new SharedArrayBuffer(1) ],
- [ new SharedArrayBuffer(2), new SharedArrayBuffer(3) ]
+ [ new SharedArrayBuffer(2), new SharedArrayBuffer(3) ],
];
const { port1, port2 } = new MessageChannel();
diff --git a/test/parallel/test-worker-message-port.js b/test/parallel/test-worker-message-port.js
index b5810e726d856c..ca28f6ccb73247 100644
--- a/test/parallel/test-worker-message-port.js
+++ b/test/parallel/test-worker-message-port.js
@@ -180,6 +180,6 @@ const { MessageChannel, MessagePort } = require('worker_threads');
Object.getOwnPropertyNames(MessagePort.prototype).sort(),
[
'close', 'constructor', 'onmessage', 'onmessageerror', 'postMessage',
- 'ref', 'start', 'unref'
+ 'ref', 'start', 'unref',
]);
}
diff --git a/test/parallel/test-worker-process-argv.js b/test/parallel/test-worker-process-argv.js
index ebdebe02ab855c..0e541c453e2419 100644
--- a/test/parallel/test-worker-process-argv.js
+++ b/test/parallel/test-worker-process-argv.js
@@ -35,7 +35,7 @@ if (isMainThread) {
`, {
argv: [null, 'foo', 123, Symbol('bar')],
eval: true
- })
+ }),
].forEach((worker) => {
worker.on('exit', common.mustCall((code) => {
assert.strictEqual(code, 0);
diff --git a/test/parallel/test-worker-type-check.js b/test/parallel/test-worker-type-check.js
index 88965f4be4c62d..9a718dfad055b4 100644
--- a/test/parallel/test-worker-type-check.js
+++ b/test/parallel/test-worker-type-check.js
@@ -13,7 +13,7 @@ const { Worker } = require('worker_threads');
Symbol('test'),
{},
[],
- () => {}
+ () => {},
].forEach((val) => {
assert.throws(
() => new Worker(val),
diff --git a/test/parallel/test-zlib-bytes-read.js b/test/parallel/test-zlib-bytes-read.js
index a7a4e523f7060b..605281cd3bd7e6 100644
--- a/test/parallel/test-zlib-bytes-read.js
+++ b/test/parallel/test-zlib-bytes-read.js
@@ -32,7 +32,7 @@ for (const method of [
['createGzip', 'createUnzip', false],
['createDeflate', 'createInflate', true],
['createDeflateRaw', 'createInflateRaw', true],
- ['createBrotliCompress', 'createBrotliDecompress', true]
+ ['createBrotliCompress', 'createBrotliDecompress', true],
]) {
let compWriter;
let compData = Buffer.alloc(0);
diff --git a/test/parallel/test-zlib-const.js b/test/parallel/test-zlib-const.js
index d25a1ca6be033a..342c8c712a475b 100644
--- a/test/parallel/test-zlib-const.js
+++ b/test/parallel/test-zlib-const.js
@@ -7,13 +7,13 @@ const zlib = require('zlib');
assert.strictEqual(zlib.constants.Z_OK, 0,
[
'Expected Z_OK to be 0;',
- `got ${zlib.constants.Z_OK}`
+ `got ${zlib.constants.Z_OK}`,
].join(' '));
zlib.constants.Z_OK = 1;
assert.strictEqual(zlib.constants.Z_OK, 0,
[
'Z_OK should be immutable.',
- `Expected to get 0, got ${zlib.constants.Z_OK}`
+ `Expected to get 0, got ${zlib.constants.Z_OK}`,
].join(' '));
assert.strictEqual(zlib.codes.Z_OK, 0,
@@ -22,17 +22,17 @@ zlib.codes.Z_OK = 1;
assert.strictEqual(zlib.codes.Z_OK, 0,
[
'Z_OK should be immutable.',
- `Expected to get 0, got ${zlib.codes.Z_OK}`
+ `Expected to get 0, got ${zlib.codes.Z_OK}`,
].join(' '));
zlib.codes = { Z_OK: 1 };
assert.strictEqual(zlib.codes.Z_OK, 0,
[
'Z_OK should be immutable.',
- `Expected to get 0, got ${zlib.codes.Z_OK}`
+ `Expected to get 0, got ${zlib.codes.Z_OK}`,
].join(' '));
assert.ok(Object.isFrozen(zlib.codes),
[
'Expected zlib.codes to be frozen, but Object.isFrozen',
- `returned ${Object.isFrozen(zlib.codes)}`
+ `returned ${Object.isFrozen(zlib.codes)}`,
].join(' '));
diff --git a/test/parallel/test-zlib-convenience-methods.js b/test/parallel/test-zlib-convenience-methods.js
index 4757eef42c236b..01ec7e211bd5aa 100644
--- a/test/parallel/test-zlib-convenience-methods.js
+++ b/test/parallel/test-zlib-convenience-methods.js
@@ -45,7 +45,7 @@ for (const [type, expect] of [
['Buffer', expectBuf],
...common.getBufferSources(expectBuf).map((obj) =>
[obj[Symbol.toStringTag], obj]
- )
+ ),
]) {
for (const method of [
['gzip', 'gunzip', 'Gzip', 'Gunzip'],
diff --git a/test/parallel/test-zlib-dictionary.js b/test/parallel/test-zlib-dictionary.js
index 11c8959cc68505..49a01d5a03ee4b 100644
--- a/test/parallel/test-zlib-dictionary.js
+++ b/test/parallel/test-zlib-dictionary.js
@@ -39,14 +39,14 @@ const spdyDict = Buffer.from([
'ndayTuesdayWednesdayThursdayFridaySaturdaySundayJanFebMarAprMayJunJulAugSe',
'pOctNovDecchunkedtext/htmlimage/pngimage/jpgimage/gifapplication/xmlapplic',
'ation/xhtmltext/plainpublicmax-agecharset=iso-8859-1utf-8gzipdeflateHTTP/1',
- '.1statusversionurl\0'
+ '.1statusversionurl\0',
].join(''));
const input = [
'HTTP/1.1 200 Ok',
'Server: node.js',
'Content-Length: 0',
- ''
+ '',
].join('\r\n');
function basicDictionaryTest(spdyDict) {
diff --git a/test/parallel/test-zlib-empty-buffer.js b/test/parallel/test-zlib-empty-buffer.js
index f225d72e649389..27fd1340fd1eb4 100644
--- a/test/parallel/test-zlib-empty-buffer.js
+++ b/test/parallel/test-zlib-empty-buffer.js
@@ -14,7 +14,7 @@ const emptyBuffer = Buffer.alloc(0);
[ promisify(zlib.deflateRaw), promisify(zlib.inflateRaw), 'raw' ],
[ promisify(zlib.deflate), promisify(zlib.inflate), 'deflate' ],
[ promisify(zlib.gzip), promisify(zlib.gunzip), 'gzip' ],
- [ promisify(zlib.brotliCompress), promisify(zlib.brotliDecompress), 'br' ]
+ [ promisify(zlib.brotliCompress), promisify(zlib.brotliDecompress), 'br' ],
]) {
const compressed = await compress(emptyBuffer);
const decompressed = await decompress(compressed);
diff --git a/test/parallel/test-zlib-flush-write-sync-interleaved.js b/test/parallel/test-zlib-flush-write-sync-interleaved.js
index 9fed592a34bb1b..f8387f40069b5f 100644
--- a/test/parallel/test-zlib-flush-write-sync-interleaved.js
+++ b/test/parallel/test-zlib-flush-write-sync-interleaved.js
@@ -52,6 +52,6 @@ process.on('exit', () => {
'compress end',
{ read: 'abc' },
{ read: 'def' },
- { read: 'ghi' }
+ { read: 'ghi' },
]);
});
diff --git a/test/parallel/test-zlib-from-concatenated-gzip.js b/test/parallel/test-zlib-from-concatenated-gzip.js
index cb9b5dd34c9f44..1de36dacf95f3d 100644
--- a/test/parallel/test-zlib-from-concatenated-gzip.js
+++ b/test/parallel/test-zlib-from-concatenated-gzip.js
@@ -15,7 +15,7 @@ const defEncoded = zlib.gzipSync(def);
const data = Buffer.concat([
abcEncoded,
- defEncoded
+ defEncoded,
]);
assert.strictEqual(zlib.gunzipSync(data).toString(), (abc + def));
@@ -31,7 +31,7 @@ zlib.unzip(data, common.mustSucceed((result) => {
// Multi-member support does not apply to zlib inflate/deflate.
zlib.unzip(Buffer.concat([
zlib.deflateSync('abc'),
- zlib.deflateSync('def')
+ zlib.deflateSync('def'),
]), common.mustSucceed((result) => {
assert.strictEqual(result.toString(), abc);
}));
@@ -75,7 +75,7 @@ fs.createReadStream(pmmFileGz)
// First write: write "abc" + the first bytes of "def"
unzip.write(Buffer.concat([
- abcEncoded, defEncoded.slice(0, offset)
+ abcEncoded, defEncoded.slice(0, offset),
]));
// Write remaining bytes of "def"
diff --git a/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js b/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js
index 14909f4cafcb08..477a6c544f2c07 100644
--- a/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js
+++ b/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js
@@ -9,7 +9,7 @@ const zlib = require('zlib');
let data = Buffer.concat([
zlib.gzipSync('abc'),
zlib.gzipSync('def'),
- Buffer.alloc(10)
+ Buffer.alloc(10),
]);
assert.strictEqual(zlib.gunzipSync(data).toString(), 'abcdef');
@@ -28,7 +28,7 @@ data = Buffer.concat([
zlib.gzipSync('abc'),
zlib.gzipSync('def'),
Buffer.from([0x1f, 0x8b, 0xff, 0xff]),
- Buffer.alloc(10)
+ Buffer.alloc(10),
]);
assert.throws(
@@ -50,7 +50,7 @@ zlib.gunzip(data, common.mustCall((err, result) => {
data = Buffer.concat([
zlib.gzipSync('abc'),
zlib.gzipSync('def'),
- Buffer.from([0x1f, 0x8b, 0xff, 0xff])
+ Buffer.from([0x1f, 0x8b, 0xff, 0xff]),
]);
assert.throws(
diff --git a/test/parallel/test-zlib-invalid-input.js b/test/parallel/test-zlib-invalid-input.js
index eb651be00fb0a6..67793984a991c5 100644
--- a/test/parallel/test-zlib-invalid-input.js
+++ b/test/parallel/test-zlib-invalid-input.js
@@ -30,7 +30,7 @@ const nonStringInputs = [
1,
true,
{ a: 1 },
- ['a']
+ ['a'],
];
// zlib.Unzip classes need to get valid data, or else they'll throw.
@@ -39,7 +39,7 @@ const unzips = [
zlib.Gunzip(),
zlib.Inflate(),
zlib.InflateRaw(),
- zlib.BrotliDecompress()
+ zlib.BrotliDecompress(),
];
nonStringInputs.forEach(common.mustCall((input) => {
diff --git a/test/parallel/test-zlib-not-string-or-buffer.js b/test/parallel/test-zlib-not-string-or-buffer.js
index b7b9a465cb89e1..a0954a0e1eaef7 100644
--- a/test/parallel/test-zlib-not-string-or-buffer.js
+++ b/test/parallel/test-zlib-not-string-or-buffer.js
@@ -15,7 +15,7 @@ const zlib = require('zlib');
0,
1,
[1, 2, 3],
- { foo: 'bar' }
+ { foo: 'bar' },
].forEach((input) => {
assert.throws(
() => zlib.deflateSync(input),
diff --git a/test/parallel/test-zlib-premature-end.js b/test/parallel/test-zlib-premature-end.js
index 9e191c4c88282c..17446c907ddc13 100644
--- a/test/parallel/test-zlib-premature-end.js
+++ b/test/parallel/test-zlib-premature-end.js
@@ -8,7 +8,7 @@ const input = '0123456789'.repeat(4);
for (const [ compress, decompressor ] of [
[ zlib.deflateRawSync, zlib.createInflateRaw ],
[ zlib.deflateSync, zlib.createInflate ],
- [ zlib.brotliCompressSync, zlib.createBrotliDecompress ]
+ [ zlib.brotliCompressSync, zlib.createBrotliDecompress ],
]) {
const compressed = compress(input);
const trailingData = Buffer.from('not valid compressed data');
@@ -18,7 +18,7 @@ for (const [ compress, decompressor ] of [
(stream) => { stream.write(compressed); stream.write(trailingData); },
(stream) => { stream.write(compressed); stream.end(trailingData); },
(stream) => { stream.write(Buffer.concat([compressed, trailingData])); },
- (stream) => { stream.end(Buffer.concat([compressed, trailingData])); }
+ (stream) => { stream.end(Buffer.concat([compressed, trailingData])); },
]) {
let output = '';
const stream = decompressor();
diff --git a/test/parallel/test-zlib-reset-before-write.js b/test/parallel/test-zlib-reset-before-write.js
index 6b2b107d25d313..57bd7083803810 100644
--- a/test/parallel/test-zlib-reset-before-write.js
+++ b/test/parallel/test-zlib-reset-before-write.js
@@ -12,7 +12,7 @@ for (const fn of [
z.reset();
cb();
},
- (z, cb) => z.params(0, zlib.constants.Z_DEFAULT_STRATEGY, cb)
+ (z, cb) => z.params(0, zlib.constants.Z_DEFAULT_STRATEGY, cb),
]) {
const deflate = zlib.createDeflate();
const inflate = zlib.createInflate();
diff --git a/test/parallel/test-zlib-truncated.js b/test/parallel/test-zlib-truncated.js
index 304f76b9da8651..bcd55923c9999c 100644
--- a/test/parallel/test-zlib-truncated.js
+++ b/test/parallel/test-zlib-truncated.js
@@ -21,7 +21,7 @@ const errMessage = /unexpected end of file/;
{ comp: 'gzip', decomp: 'gunzip', decompSync: 'gunzipSync' },
{ comp: 'gzip', decomp: 'unzip', decompSync: 'unzipSync' },
{ comp: 'deflate', decomp: 'inflate', decompSync: 'inflateSync' },
- { comp: 'deflateRaw', decomp: 'inflateRaw', decompSync: 'inflateRawSync' }
+ { comp: 'deflateRaw', decomp: 'inflateRaw', decompSync: 'inflateRawSync' },
].forEach(function(methods) {
zlib[methods.comp](inputString, function(err, compressed) {
assert.ifError(err);
diff --git a/test/parallel/test-zlib-unzip-one-byte-chunks.js b/test/parallel/test-zlib-unzip-one-byte-chunks.js
index be3b5dda818cf6..3d3d9c37ff0198 100644
--- a/test/parallel/test-zlib-unzip-one-byte-chunks.js
+++ b/test/parallel/test-zlib-unzip-one-byte-chunks.js
@@ -5,7 +5,7 @@ const zlib = require('zlib');
const data = Buffer.concat([
zlib.gzipSync('abc'),
- zlib.gzipSync('def')
+ zlib.gzipSync('def'),
]);
const resultBuffers = [];
diff --git a/test/pseudo-tty/test-set-raw-mode-reset-process-exit.js b/test/pseudo-tty/test-set-raw-mode-reset-process-exit.js
index b6857eaebbdf60..1f80ab304d540d 100644
--- a/test/pseudo-tty/test-set-raw-mode-reset-process-exit.js
+++ b/test/pseudo-tty/test-set-raw-mode-reset-process-exit.js
@@ -5,7 +5,7 @@ const child_process = require('child_process');
// Tests that exiting through process.exit() resets the TTY mode.
child_process.spawnSync(process.execPath, [
- '-e', 'process.stdin.setRawMode(true); process.exit(0)'
+ '-e', 'process.stdin.setRawMode(true); process.exit(0)',
], { stdio: 'inherit' });
const { stdout } = child_process.spawnSync('stty', {
diff --git a/test/pseudo-tty/test-set-raw-mode-reset-signal.js b/test/pseudo-tty/test-set-raw-mode-reset-signal.js
index f953a01331c050..8b666f3ee0a8c3 100644
--- a/test/pseudo-tty/test-set-raw-mode-reset-signal.js
+++ b/test/pseudo-tty/test-set-raw-mode-reset-signal.js
@@ -5,7 +5,7 @@ const child_process = require('child_process');
// Tests that exiting through a catchable signal resets the TTY mode.
const proc = child_process.spawn(process.execPath, [
- '-e', 'process.stdin.setRawMode(true); console.log("Y"); while(true) {}'
+ '-e', 'process.stdin.setRawMode(true); console.log("Y"); while(true) {}',
], { stdio: ['inherit', 'pipe', 'inherit'] });
proc.stdout.on('data', common.mustCall(() => {
diff --git a/test/pseudo-tty/test-set-raw-mode-reset.js b/test/pseudo-tty/test-set-raw-mode-reset.js
index ab8f1125bfc602..7cd9bba80672fe 100644
--- a/test/pseudo-tty/test-set-raw-mode-reset.js
+++ b/test/pseudo-tty/test-set-raw-mode-reset.js
@@ -6,7 +6,7 @@ const child_process = require('child_process');
// Refs: https://github.com/nodejs/node/issues/21020
child_process.spawnSync(process.execPath, [
- '-e', 'process.stdin.setRawMode(true)'
+ '-e', 'process.stdin.setRawMode(true)',
], { stdio: 'inherit' });
const { stdout } = child_process.spawnSync('stty', {
diff --git a/test/pummel/test-fs-watch-system-limit.js b/test/pummel/test-fs-watch-system-limit.js
index 8b9cb62ad0a007..ce390dd3d0bb83 100644
--- a/test/pummel/test-fs-watch-system-limit.js
+++ b/test/pummel/test-fs-watch-system-limit.js
@@ -37,7 +37,7 @@ function spawnProcesses() {
[ '-e',
`process.chdir(${JSON.stringify(__dirname)});
for (const file of fs.readdirSync('.'))
- fs.watch(file, () => {});`
+ fs.watch(file, () => {});`,
], { stdio: ['inherit', 'inherit', 'pipe'] });
proc.stderr.pipe(gatherStderr);
processes.push(proc);
diff --git a/test/pummel/test-heapdump-dns.js b/test/pummel/test-heapdump-dns.js
index 6fe79f7dd4ec5a..68ce08d96e3242 100644
--- a/test/pummel/test-heapdump-dns.js
+++ b/test/pummel/test-heapdump-dns.js
@@ -12,7 +12,7 @@ validateSnapshotNodes('Node / ChannelWrap', [
children: [
{ node_name: 'Node / node_ares_task_list', edge_name: 'task_list' },
// `Node / ChannelWrap` (C++) -> `ChannelWrap` (JS)
- { node_name: 'ChannelWrap', edge_name: 'wrapped' }
+ { node_name: 'ChannelWrap', edge_name: 'wrapped' },
]
- }
+ },
]);
diff --git a/test/pummel/test-heapdump-fs-promise.js b/test/pummel/test-heapdump-fs-promise.js
index ca170e13a61770..181029dd69c11f 100644
--- a/test/pummel/test-heapdump-fs-promise.js
+++ b/test/pummel/test-heapdump-fs-promise.js
@@ -10,7 +10,7 @@ validateSnapshotNodes('Node / FSReqPromise', [
{
children: [
{ node_name: 'FSReqPromise', edge_name: 'wrapped' },
- { node_name: 'Float64Array', edge_name: 'stats_field_array' }
+ { node_name: 'Float64Array', edge_name: 'stats_field_array' },
]
- }
+ },
]);
diff --git a/test/pummel/test-heapdump-http2.js b/test/pummel/test-heapdump-http2.js
index fe11dcfb2f44bb..2fa854a91f117d 100644
--- a/test/pummel/test-heapdump-http2.js
+++ b/test/pummel/test-heapdump-http2.js
@@ -28,7 +28,7 @@ server.listen(0, () => {
{
children: [
// current_headers and/or queue could be empty
- { node_name: 'Http2Stream', edge_name: 'wrapped' }
+ { node_name: 'Http2Stream', edge_name: 'wrapped' },
]
},
], { loose: true });
@@ -37,32 +37,32 @@ server.listen(0, () => {
state.validateSnapshotNodes('Node / FileHandle', [
{
children: [
- { node_name: 'FileHandle', edge_name: 'wrapped' }
+ { node_name: 'FileHandle', edge_name: 'wrapped' },
// current_headers could be empty
]
- }
+ },
], { loose: true });
state.validateSnapshotNodes('Node / TCPSocketWrap', [
{
children: [
- { node_name: 'TCP', edge_name: 'wrapped' }
+ { node_name: 'TCP', edge_name: 'wrapped' },
]
- }
+ },
], { loose: true });
state.validateSnapshotNodes('Node / TCPServerWrap', [
{
children: [
- { node_name: 'TCP', edge_name: 'wrapped' }
+ { node_name: 'TCP', edge_name: 'wrapped' },
]
- }
+ },
], { loose: true });
// `Node / StreamPipe` (C++) -> StreamPipe (JS)
state.validateSnapshotNodes('Node / StreamPipe', [
{
children: [
- { node_name: 'StreamPipe', edge_name: 'wrapped' }
+ { node_name: 'StreamPipe', edge_name: 'wrapped' },
]
- }
+ },
]);
// `Node / Http2Session` (C++) -> Http2Session (JS)
state.validateSnapshotNodes('Node / Http2Session', [
@@ -72,11 +72,11 @@ server.listen(0, () => {
{ node_name: 'Node / nghttp2_memory', edge_name: 'nghttp2_memory' },
{
node_name: 'Node / streams', edge_name: 'streams'
- }
+ },
// outstanding_pings, outgoing_buffers, outgoing_storage,
// pending_rst_streams could be empty
]
- }
+ },
], { loose: true });
}));
diff --git a/test/pummel/test-heapdump-inspector.js b/test/pummel/test-heapdump-inspector.js
index d46be57c914a06..9b08e33fdb2bce 100644
--- a/test/pummel/test-heapdump-inspector.js
+++ b/test/pummel/test-heapdump-inspector.js
@@ -9,7 +9,7 @@ const inspector = require('inspector');
const snapshotNode = {
children: [
- { node_name: 'Node / InspectorSession', edge_name: 'session' }
+ { node_name: 'Node / InspectorSession', edge_name: 'session' },
]
};
@@ -33,9 +33,9 @@ const snapshotNode = {
{ node_name: 'Connection', edge_name: 'wrapped' },
(edge) => edge.name === 'callback' &&
(edge.to.type === undefined || // embedded graph
- edge.to.type === 'closure') // snapshot
+ edge.to.type === 'closure'), // snapshot
]
- }
+ },
];
if (process.env.NODE_V8_COVERAGE) {
expected.push(snapshotNode);
diff --git a/test/pummel/test-heapdump-tls.js b/test/pummel/test-heapdump-tls.js
index fee19bf67625b2..a58a543a28d65d 100644
--- a/test/pummel/test-heapdump-tls.js
+++ b/test/pummel/test-heapdump-tls.js
@@ -27,9 +27,9 @@ const server = net.createServer(common.mustCall((c) => {
{ node_name: 'Node / NodeBIO', edge_name: 'enc_out' },
{ node_name: 'Node / NodeBIO', edge_name: 'enc_in' },
// `Node / TLSWrap` (C++) -> `TLSWrap` (JS)
- { node_name: 'TLSWrap', edge_name: 'wrapped' }
+ { node_name: 'TLSWrap', edge_name: 'wrapped' },
// pending_cleartext_input could be empty
]
- }
+ },
]);
}));
diff --git a/test/pummel/test-heapdump-worker.js b/test/pummel/test-heapdump-worker.js
index 6e91bee4d3d378..0e8322affb5d64 100644
--- a/test/pummel/test-heapdump-worker.js
+++ b/test/pummel/test-heapdump-worker.js
@@ -10,15 +10,15 @@ validateSnapshotNodes('Node / Worker', [
{
children: [
{ node_name: 'Node / MessagePort', edge_name: 'parent_port' },
- { node_name: 'Worker', edge_name: 'wrapped' }
+ { node_name: 'Worker', edge_name: 'wrapped' },
]
- }
+ },
]);
validateSnapshotNodes('Node / MessagePort', [
{
children: [
- { node_name: 'Node / MessagePortData', edge_name: 'data' }
+ { node_name: 'Node / MessagePortData', edge_name: 'data' },
]
- }
+ },
], { loose: true });
worker.terminate();
diff --git a/test/pummel/test-heapdump-zlib.js b/test/pummel/test-heapdump-zlib.js
index ef906c9935274e..16e4ede4f916a2 100644
--- a/test/pummel/test-heapdump-zlib.js
+++ b/test/pummel/test-heapdump-zlib.js
@@ -10,10 +10,10 @@ const gzip = zlib.createGzip();
validateSnapshotNodes('Node / ZlibStream', [
{
children: [
- { node_name: 'Zlib', edge_name: 'wrapped' }
+ { node_name: 'Zlib', edge_name: 'wrapped' },
// No entry for memory because zlib memory is initialized lazily.
]
- }
+ },
]);
gzip.write('hello world', common.mustCall(() => {
@@ -21,8 +21,8 @@ gzip.write('hello world', common.mustCall(() => {
{
children: [
{ node_name: 'Zlib', edge_name: 'wrapped' },
- { node_name: 'Node / zlib_memory', edge_name: 'zlib_memory' }
+ { node_name: 'Node / zlib_memory', edge_name: 'zlib_memory' },
]
- }
+ },
]);
}));
diff --git a/test/pummel/test-heapsnapshot-near-heap-limit-big.js b/test/pummel/test-heapsnapshot-near-heap-limit-big.js
index 3442ae068be06f..14f62e3cbc4069 100644
--- a/test/pummel/test-heapsnapshot-near-heap-limit-big.js
+++ b/test/pummel/test-heapsnapshot-near-heap-limit-big.js
@@ -20,7 +20,7 @@ if (!common.enoughTestMem)
const child = spawnSync(process.execPath, [
'--heapsnapshot-near-heap-limit=3',
'--max-old-space-size=512',
- fixtures.path('workload', 'grow.js')
+ fixtures.path('workload', 'grow.js'),
], {
cwd: tmpdir.path,
env: {
diff --git a/test/pummel/test-worker-take-heapsnapshot.js b/test/pummel/test-worker-take-heapsnapshot.js
index b369759d0613e5..71f1782fe58d1d 100644
--- a/test/pummel/test-worker-take-heapsnapshot.js
+++ b/test/pummel/test-worker-take-heapsnapshot.js
@@ -14,9 +14,9 @@ const { once } = require('events');
snapshot.validateSnapshot('Node / MessagePort', [
{
children: [
- { node_name: 'Node / MessagePortData', edge_name: 'data' }
+ { node_name: 'Node / MessagePortData', edge_name: 'data' },
]
- }
+ },
], { loose: true });
await w.terminate();
})().then(common.mustCall());
diff --git a/test/report/test-report-fatal-error.js b/test/report/test-report-fatal-error.js
index c166c4b86c384f..c913240c4bc7ee 100644
--- a/test/report/test-report-fatal-error.js
+++ b/test/report/test-report-fatal-error.js
@@ -28,7 +28,7 @@ if (process.argv[2] === 'child') {
const ARGS = [
'--max-old-space-size=20',
__filename,
- 'child'
+ 'child',
];
{
@@ -104,7 +104,7 @@ const ARGS = [
'--report-on-fatalerror',
'--report-compact',
'--report-filename=stderr',
- ...ARGS
+ ...ARGS,
];
const child = spawnSync(process.execPath, args, { encoding: 'utf8' });
assert.notStrictEqual(child.status, 0, 'Process exited unexpectedly');
diff --git a/test/sequential/test-buffer-creation-regression.js b/test/sequential/test-buffer-creation-regression.js
index 07deb1db0fe377..4122cd0c78a620 100644
--- a/test/sequential/test-buffer-creation-regression.js
+++ b/test/sequential/test-buffer-creation-regression.js
@@ -17,7 +17,7 @@ function test(arrayBuffer, offset, length) {
const acceptableOOMErrors = [
'Array buffer allocation failed',
- 'Invalid array buffer length'
+ 'Invalid array buffer length',
];
const length = 1000;
diff --git a/test/sequential/test-child-process-execsync.js b/test/sequential/test-child-process-execsync.js
index 5dbf5c2f9aa915..bc589efb8b5b64 100644
--- a/test/sequential/test-child-process-execsync.js
+++ b/test/sequential/test-child-process-execsync.js
@@ -87,7 +87,7 @@ const cmd = `"${process.execPath}" -e "console.log('${msg}');"`;
const args = [
'-e',
- `console.log("${msg}");`
+ `console.log("${msg}");`,
];
{
const ret = execFileSync(process.execPath, args);
@@ -128,7 +128,7 @@ const args = [
'signal',
'status',
'stderr',
- 'stdout'
+ 'stdout',
]);
assert.throws(() => {
diff --git a/test/sequential/test-cli-syntax-bad.js b/test/sequential/test-cli-syntax-bad.js
index 8298157a57e16e..319746adfb670e 100644
--- a/test/sequential/test-cli-syntax-bad.js
+++ b/test/sequential/test-cli-syntax-bad.js
@@ -10,7 +10,7 @@ const node = process.execPath;
// Test both sets of arguments that check syntax
const syntaxArgs = [
['-c'],
- ['--check']
+ ['--check'],
];
// Match on the name of the `Error` but not the message as it is different
@@ -22,7 +22,7 @@ const syntaxErrorRE = /^SyntaxError: \b/m;
'syntax/bad_syntax.js',
'syntax/bad_syntax',
'syntax/bad_syntax_shebang.js',
- 'syntax/bad_syntax_shebang'
+ 'syntax/bad_syntax_shebang',
].forEach(function(file) {
file = fixtures.path(file);
diff --git a/test/sequential/test-cli-syntax-file-not-found.js b/test/sequential/test-cli-syntax-file-not-found.js
index 3e1f3ec56118b3..6a4c6338311d58 100644
--- a/test/sequential/test-cli-syntax-file-not-found.js
+++ b/test/sequential/test-cli-syntax-file-not-found.js
@@ -10,7 +10,7 @@ const node = process.execPath;
// Test both sets of arguments that check syntax
const syntaxArgs = [
['-c'],
- ['--check']
+ ['--check'],
];
const notFoundRE = /^Error: Cannot find module/m;
@@ -18,7 +18,7 @@ const notFoundRE = /^Error: Cannot find module/m;
// test file not found
[
'syntax/file_not_found.js',
- 'syntax/file_not_found'
+ 'syntax/file_not_found',
].forEach(function(file) {
file = fixtures.path(file);
diff --git a/test/sequential/test-cli-syntax-good.js b/test/sequential/test-cli-syntax-good.js
index 48581e7733da44..262c30ccad6bce 100644
--- a/test/sequential/test-cli-syntax-good.js
+++ b/test/sequential/test-cli-syntax-good.js
@@ -10,7 +10,7 @@ const node = process.execPath;
// Test both sets of arguments that check syntax
const syntaxArgs = [
['-c'],
- ['--check']
+ ['--check'],
];
// Test good syntax with and without shebang
@@ -19,7 +19,7 @@ const syntaxArgs = [
'syntax/good_syntax',
'syntax/good_syntax_shebang.js',
'syntax/good_syntax_shebang',
- 'syntax/illegal_if_not_wrapped.js'
+ 'syntax/illegal_if_not_wrapped.js',
].forEach(function(file) {
file = fixtures.path(file);
diff --git a/test/sequential/test-debugger-repeat-last.js b/test/sequential/test-debugger-repeat-last.js
index 42638e5d2ebf12..5bdcc7dc8c8642 100644
--- a/test/sequential/test-debugger-repeat-last.js
+++ b/test/sequential/test-debugger-repeat-last.js
@@ -9,7 +9,7 @@ const fixture = path('debugger-repeat-last.js');
const args = [
'inspect',
`--port=${common.PORT}`,
- fixture
+ fixture,
];
const proc = spawn(process.execPath, args, { stdio: 'pipe' });
diff --git a/test/sequential/test-inspector-async-hook-setup-at-inspect-brk.js b/test/sequential/test-inspector-async-hook-setup-at-inspect-brk.js
index b1701b5de79d9f..04e36b589d2461 100644
--- a/test/sequential/test-inspector-async-hook-setup-at-inspect-brk.js
+++ b/test/sequential/test-inspector-async-hook-setup-at-inspect-brk.js
@@ -37,7 +37,7 @@ async function runTests() {
'params': { 'maxDepth': 10 } },
{ 'method': 'Debugger.setBlackboxPatterns',
'params': { 'patterns': [] } },
- { 'method': 'Runtime.runIfWaitingForDebugger' }
+ { 'method': 'Runtime.runIfWaitingForDebugger' },
]);
await skipBreakpointAtStart(session);
await checkAsyncStackTrace(session);
diff --git a/test/sequential/test-inspector-async-hook-setup-at-signal.js b/test/sequential/test-inspector-async-hook-setup-at-signal.js
index 259a40db976e46..1de7a3ed20acf6 100644
--- a/test/sequential/test-inspector-async-hook-setup-at-signal.js
+++ b/test/sequential/test-inspector-async-hook-setup-at-signal.js
@@ -45,7 +45,7 @@ async function setupTimeoutForStackTrace(session) {
await session.send([
{ 'method': 'Runtime.evaluate',
'params': { expression: 'setupTimeoutWithBreak()' } },
- { 'method': 'Debugger.resume' }
+ { 'method': 'Debugger.resume' },
]);
}
@@ -69,7 +69,7 @@ async function runTests() {
'params': { 'maxDepth': 10 } },
{ 'method': 'Debugger.setBlackboxPatterns',
'params': { 'patterns': [] } },
- { 'method': 'Runtime.runIfWaitingForDebugger' }
+ { 'method': 'Runtime.runIfWaitingForDebugger' },
]);
await waitForInitialSetup(session);
diff --git a/test/sequential/test-inspector-async-stack-traces-promise-then.js b/test/sequential/test-inspector-async-stack-traces-promise-then.js
index 40b05c9aacf375..f50d8994a24c95 100644
--- a/test/sequential/test-inspector-async-stack-traces-promise-then.js
+++ b/test/sequential/test-inspector-async-stack-traces-promise-then.js
@@ -27,7 +27,7 @@ async function runTests() {
'params': { 'maxDepth': 10 } },
{ 'method': 'Debugger.setBlackboxPatterns',
'params': { 'patterns': [] } },
- { 'method': 'Runtime.runIfWaitingForDebugger' }
+ { 'method': 'Runtime.runIfWaitingForDebugger' },
]);
await session.waitForBreakOnLine(0, '[eval]');
diff --git a/test/sequential/test-inspector-async-stack-traces-set-interval.js b/test/sequential/test-inspector-async-stack-traces-set-interval.js
index d2174cf9ed84fc..35d2577b0c8f11 100644
--- a/test/sequential/test-inspector-async-stack-traces-set-interval.js
+++ b/test/sequential/test-inspector-async-stack-traces-set-interval.js
@@ -33,7 +33,7 @@ async function runTests() {
'params': { 'maxDepth': 10 } },
{ 'method': 'Debugger.setBlackboxPatterns',
'params': { 'patterns': [] } },
- { 'method': 'Runtime.runIfWaitingForDebugger' }
+ { 'method': 'Runtime.runIfWaitingForDebugger' },
]);
await skipFirstBreakpoint(session);
diff --git a/test/sequential/test-inspector-break-e.js b/test/sequential/test-inspector-break-e.js
index f2a52fcae835fd..274422cf59b190 100644
--- a/test/sequential/test-inspector-break-e.js
+++ b/test/sequential/test-inspector-break-e.js
@@ -11,7 +11,7 @@ async function runTests() {
await session.send([
{ 'method': 'Runtime.enable' },
{ 'method': 'Debugger.enable' },
- { 'method': 'Runtime.runIfWaitingForDebugger' }
+ { 'method': 'Runtime.runIfWaitingForDebugger' },
]);
await session.waitForBreakOnLine(0, '[eval]');
await session.runToCompletion();
diff --git a/test/sequential/test-inspector-break-when-eval.js b/test/sequential/test-inspector-break-when-eval.js
index 0dd66588ed23b9..1e7ab513dadbbb 100644
--- a/test/sequential/test-inspector-break-when-eval.js
+++ b/test/sequential/test-inspector-break-when-eval.js
@@ -46,7 +46,7 @@ async function breakOnLine(session) {
'returnByValue': false,
'generatePreview': true,
'userGesture': true,
- 'awaitPromise': false } }
+ 'awaitPromise': false } },
];
session.send(commands);
await session.waitForBreakOnLine(9, pathToFileURL(script).toString());
diff --git a/test/sequential/test-inspector-console.js b/test/sequential/test-inspector-console.js
index bb0f0ce42a3d03..33cd913efb2cec 100644
--- a/test/sequential/test-inspector-console.js
+++ b/test/sequential/test-inspector-console.js
@@ -17,7 +17,7 @@ async function runTest() {
const commands = [
{ 'method': 'Runtime.enable' },
- { 'method': 'Runtime.runIfWaitingForDebugger' }
+ { 'method': 'Runtime.runIfWaitingForDebugger' },
];
session.send(commands);
diff --git a/test/sequential/test-inspector-debug-brk-flag.js b/test/sequential/test-inspector-debug-brk-flag.js
index f1312b47ad8d8b..db235326e96ff9 100644
--- a/test/sequential/test-inspector-debug-brk-flag.js
+++ b/test/sequential/test-inspector-debug-brk-flag.js
@@ -19,7 +19,7 @@ async function testBreakpointOnStart(session) {
'params': { 'interval': 100 } },
{ 'method': 'Debugger.setBlackboxPatterns',
'params': { 'patterns': [] } },
- { 'method': 'Runtime.runIfWaitingForDebugger' }
+ { 'method': 'Runtime.runIfWaitingForDebugger' },
];
session.send(commands);
diff --git a/test/sequential/test-inspector-exception.js b/test/sequential/test-inspector-exception.js
index f1cd2eca3f30f3..fc41de97e97841 100644
--- a/test/sequential/test-inspector-exception.js
+++ b/test/sequential/test-inspector-exception.js
@@ -25,7 +25,7 @@ async function testBreakpointOnStart(session) {
'params': { 'interval': 100 } },
{ 'method': 'Debugger.setBlackboxPatterns',
'params': { 'patterns': [] } },
- { 'method': 'Runtime.runIfWaitingForDebugger' }
+ { 'method': 'Runtime.runIfWaitingForDebugger' },
];
await session.send(commands);
diff --git a/test/sequential/test-inspector-not-blocked-on-idle.js b/test/sequential/test-inspector-not-blocked-on-idle.js
index fbf26d15c91f12..0a38540c3e8a0d 100644
--- a/test/sequential/test-inspector-not-blocked-on-idle.js
+++ b/test/sequential/test-inspector-not-blocked-on-idle.js
@@ -11,7 +11,7 @@ async function runTests() {
const session = await node.connectInspectorSession();
await session.send([
{ 'method': 'Debugger.enable' },
- { 'method': 'Debugger.pause' }
+ { 'method': 'Debugger.pause' },
]);
session.disconnect();
node.kill();
diff --git a/test/sequential/test-inspector-port-cluster.js b/test/sequential/test-inspector-port-cluster.js
index 7d3cde39af6f6d..510249b739dfb7 100644
--- a/test/sequential/test-inspector-port-cluster.js
+++ b/test/sequential/test-inspector-port-cluster.js
@@ -29,7 +29,7 @@ function testRunnerMain() {
{ expectedPort: 65535 },
{ expectedPort: 1024 },
{ expectedPort: 1025 },
- { expectedPort: 1026 }
+ { expectedPort: 1026 },
]
});
@@ -40,7 +40,7 @@ function testRunnerMain() {
workers: [
{ expectedPort: port + 1 },
{ expectedPort: port + 2 },
- { expectedPort: port + 3 }
+ { expectedPort: port + 3 },
]
});
@@ -106,7 +106,7 @@ function testRunnerMain() {
clusterSettings: { inspectPort: 'addTwo' },
workers: [
{ expectedPort: port + 2 },
- { expectedPort: port + 4 }
+ { expectedPort: port + 4 },
]
});
@@ -164,7 +164,7 @@ function testRunnerMain() {
execArgv: [],
clusterSettings: { inspectPort: port, execArgv: ['--inspect'] },
workers: [
- { expectedPort: port }
+ { expectedPort: port },
]
});
@@ -176,7 +176,7 @@ function testRunnerMain() {
workers: [
{ expectedInitialPort: 0 },
{ expectedInitialPort: 0 },
- { expectedInitialPort: 0 }
+ { expectedInitialPort: 0 },
]
});
@@ -188,7 +188,7 @@ function testRunnerMain() {
workers: [
{ expectedInitialPort: 0 },
{ expectedInitialPort: 0 },
- { expectedInitialPort: 0 }
+ { expectedInitialPort: 0 },
]
});
@@ -198,7 +198,7 @@ function testRunnerMain() {
execArgv: ['--inspect'],
clusterSettings: { inspectPort: port + 2 },
workers: [
- { expectedInitialPort: port + 2 }
+ { expectedInitialPort: port + 2 },
]
});
});
diff --git a/test/sequential/test-inspector-scriptparsed-context.js b/test/sequential/test-inspector-scriptparsed-context.js
index e656436879ce63..3c5c07a53a78c0 100644
--- a/test/sequential/test-inspector-scriptparsed-context.js
+++ b/test/sequential/test-inspector-scriptparsed-context.js
@@ -48,7 +48,7 @@ async function runTests() {
const session = await instance.connectInspectorSession();
await session.send([
{ 'method': 'Debugger.enable' },
- { 'method': 'Runtime.runIfWaitingForDebugger' }
+ { 'method': 'Runtime.runIfWaitingForDebugger' },
]);
await session.waitForBreakOnLine(2, '[eval]');
diff --git a/test/sequential/test-inspector.js b/test/sequential/test-inspector.js
index d1fa08a35f9561..84e0bb1c5e0c44 100644
--- a/test/sequential/test-inspector.js
+++ b/test/sequential/test-inspector.js
@@ -72,7 +72,7 @@ async function testBreakpointOnStart(session) {
'params': { 'interval': 100 } },
{ 'method': 'Debugger.setBlackboxPatterns',
'params': { 'patterns': [] } },
- { 'method': 'Runtime.runIfWaitingForDebugger' }
+ { 'method': 'Runtime.runIfWaitingForDebugger' },
];
await session.send(commands);
@@ -187,7 +187,7 @@ async function testCommandLineAPI(session) {
'expression': [
'typeof require.resolve === "function"',
'typeof require.extensions === "object"',
- 'typeof require.cache === "object"'
+ 'typeof require.cache === "object"',
].join(' && '),
'includeCommandLineAPI': true
}
diff --git a/test/tick-processor/test-tick-processor-polyfill-brokenfile.js b/test/tick-processor/test-tick-processor-polyfill-brokenfile.js
index f61bdbe9a12510..98cbf5bb414789 100644
--- a/test/tick-processor/test-tick-processor-polyfill-brokenfile.js
+++ b/test/tick-processor/test-tick-processor-polyfill-brokenfile.js
@@ -37,7 +37,7 @@ const proc = spawn(process.execPath, [
'--no_logfile_per_isolate',
'--logfile=-',
'--prof',
- '-pe', code
+ '-pe', code,
], {
stdio: ['ignore', 'pipe', 'inherit']
});
@@ -53,7 +53,7 @@ function runPolyfill(content) {
const child = spawnSync(
`${process.execPath}`,
[
- '--prof-process', LOG_FILE
+ '--prof-process', LOG_FILE,
]);
assert(WARN_REG_EXP.test(child.stderr.toString()));
assert(WARN_DETAIL_REG_EXP.test(child.stderr.toString()));
diff --git a/test/tick-processor/tick-processor-base.js b/test/tick-processor/tick-processor-base.js
index 33944655258bef..d9f23ae7d768f5 100644
--- a/test/tick-processor/tick-processor-base.js
+++ b/test/tick-processor/tick-processor-base.js
@@ -15,7 +15,7 @@ function runTest(test) {
'--no_logfile_per_isolate',
'--logfile=-',
'--prof',
- '-pe', test.code
+ '-pe', test.code,
], {
stdio: [ 'ignore', 'pipe', 'inherit' ]
});
@@ -37,7 +37,7 @@ function match(pattern, parent, ticks, flags = []) {
'--prof-process',
'--call-graph-size=10',
...flags,
- LOG_FILE
+ LOG_FILE,
], {
stdio: [ 'ignore', 'pipe', 'inherit' ]
});
diff --git a/test/v8-updates/test-linux-perf.js b/test/v8-updates/test-linux-perf.js
index 01ebce0ae5af9a..9a8097b071a2b5 100644
--- a/test/v8-updates/test-linux-perf.js
+++ b/test/v8-updates/test-linux-perf.js
@@ -68,7 +68,7 @@ const perfCompiledFramesArgs = [
];
const perfArgsList = [
- perfInterpretedFramesArgs, perfCompiledFramesArgs
+ perfInterpretedFramesArgs, perfCompiledFramesArgs,
];
const perfScriptArgs = [
diff --git a/test/wasi/test-wasi-not-started.js b/test/wasi/test-wasi-not-started.js
index 14c8cdfddf2f5c..0dde5495112497 100644
--- a/test/wasi/test-wasi-not-started.js
+++ b/test/wasi/test-wasi-not-started.js
@@ -30,7 +30,7 @@ if (process.argv[2] === 'wasi-child') {
const child = cp.spawnSync(process.execPath, [
'--experimental-wasi-unstable-preview1',
__filename,
- 'wasi-child'
+ 'wasi-child',
], {
env: { ...process.env, NODE_DEBUG_NATIVE: 'wasi' }
});
diff --git a/test/wasi/test-wasi-symlinks.js b/test/wasi/test-wasi-symlinks.js
index f10bcd01fe48e8..7dd9ae746b0886 100644
--- a/test/wasi/test-wasi-symlinks.js
+++ b/test/wasi/test-wasi-symlinks.js
@@ -65,7 +65,7 @@ if (process.argv[2] === 'wasi-child') {
__filename,
'wasi-child',
options.test,
- sandbox
+ sandbox,
], opts);
console.log(child.stderr.toString());
assert.strictEqual(child.status, 0);
diff --git a/test/wasi/test-wasi-worker-terminate.js b/test/wasi/test-wasi-worker-terminate.js
index 118c2a9d47e411..a0851e14ad6b62 100644
--- a/test/wasi/test-wasi-worker-terminate.js
+++ b/test/wasi/test-wasi-worker-terminate.js
@@ -19,7 +19,7 @@ const bytecode = new Uint8Array([
0x64, 0x75, 0x63, 0x65, 0x72, 0x73, 0x01, 0x0c, 0x70, 0x72, 0x6f, 0x63,
0x65, 0x73, 0x73, 0x65, 0x64, 0x2d, 0x62, 0x79, 0x01, 0x05, 0x63, 0x6c,
0x61, 0x6e, 0x67, 0x0f, 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x30, 0x2d, 0x34,
- 0x75, 0x62, 0x75, 0x6e, 0x74, 0x75, 0x31
+ 0x75, 0x62, 0x75, 0x6e, 0x74, 0x75, 0x31,
]);
// Do not use isMainThread so that this test itself can be run inside a Worker.
diff --git a/test/wasi/test-wasi.js b/test/wasi/test-wasi.js
index 261d7928ecad8e..26002a7e5536ed 100644
--- a/test/wasi/test-wasi.js
+++ b/test/wasi/test-wasi.js
@@ -53,7 +53,7 @@ if (process.argv[2] === 'wasi-child') {
'--experimental-wasi-unstable-preview1',
__filename,
'wasi-child',
- options.test
+ options.test,
], opts);
console.log(child.stderr.toString());
assert.strictEqual(child.status, options.exitCode || 0);