diff --git a/test/.eslintrc.yaml b/test/.eslintrc.yaml index f66b101bc06f3a..1589547b525736 100644 --- a/test/.eslintrc.yaml +++ b/test/.eslintrc.yaml @@ -72,7 +72,6 @@ globals: overrides: - files: - - addons/*/*.js - async-hooks/*.js - es-module/*.js - es-module/*.mjs diff --git a/test/addons/async-hooks-id/test.js b/test/addons/async-hooks-id/test.js index c6ce366c5de756..fd4a88c29f6076 100644 --- a/test/addons/async-hooks-id/test.js +++ b/test/addons/async-hooks-id/test.js @@ -7,20 +7,20 @@ const async_hooks = require('async_hooks'); assert.strictEqual( binding.getExecutionAsyncId(), - async_hooks.executionAsyncId() + async_hooks.executionAsyncId(), ); assert.strictEqual( binding.getTriggerAsyncId(), - async_hooks.triggerAsyncId() + async_hooks.triggerAsyncId(), ); process.nextTick(common.mustCall(() => { assert.strictEqual( binding.getExecutionAsyncId(), - async_hooks.executionAsyncId() + async_hooks.executionAsyncId(), ); assert.strictEqual( binding.getTriggerAsyncId(), - async_hooks.triggerAsyncId() + async_hooks.triggerAsyncId(), ); })); diff --git a/test/addons/async-resource/test.js b/test/addons/async-resource/test.js index c37d4df83d0103..86cbb38e1cf2df 100644 --- a/test/addons/async-resource/test.js +++ b/test/addons/async-resource/test.js @@ -38,7 +38,7 @@ async_hooks.createHook({ destroy(id) { if (bindingUids.includes(id)) destroy++; - } + }, }).enable(); for (const call of [binding.callViaFunction, @@ -53,7 +53,7 @@ for (const call of [binding.callViaFunction, assert.strictEqual(async_hooks.executionAsyncId(), uid); return 'baz'; }, - kObjectTag + kObjectTag, }; if (passedTriggerId === undefined) diff --git a/test/addons/callback-scope/test-async-hooks.js b/test/addons/callback-scope/test-async-hooks.js index 94b53efc53d78e..3c276ce00ff482 100644 --- a/test/addons/callback-scope/test-async-hooks.js +++ b/test/addons/callback-scope/test-async-hooks.js @@ -14,7 +14,7 @@ async_hooks.createHook({ after: common.mustCall((id) => { assert.strictEqual(id, 1000); insideHook = false; - }) + }), }).enable(); runInCallbackScope({}, 1000, 1000, () => { diff --git a/test/addons/no-addons/test-worker.js b/test/addons/no-addons/test-worker.js index 2a89cef3e2736d..25e893ca33aea7 100644 --- a/test/addons/no-addons/test-worker.js +++ b/test/addons/no-addons/test-worker.js @@ -13,7 +13,7 @@ const assertError = (error) => { assert.strictEqual(error.code, 'ERR_DLOPEN_DISABLED'); assert.strictEqual( error.message, - 'Cannot load native addon because loading addons is disabled.' + 'Cannot load native addon because loading addons is disabled.', ); }; @@ -32,7 +32,7 @@ const assertError = (error) => { `process.dlopen({ exports: {} }, ${JSON.stringify(binding)});`, { eval: true, - } + }, ); worker.on('error', common.mustCall(assertError)); diff --git a/test/addons/no-addons/test.js b/test/addons/no-addons/test.js index 063dd3491e36fc..485fad4a8bc643 100644 --- a/test/addons/no-addons/test.js +++ b/test/addons/no-addons/test.js @@ -12,7 +12,7 @@ const assertError = (error) => { assert.strictEqual(error.code, 'ERR_DLOPEN_DISABLED'); assert.strictEqual( error.message, - 'Cannot load native addon because loading addons is disabled.' + 'Cannot load native addon because loading addons is disabled.', ); }; diff --git a/test/addons/non-node-context/test-make-buffer.js b/test/addons/non-node-context/test-make-buffer.js index d134f63b77283c..344ea973d76c0c 100644 --- a/test/addons/non-node-context/test-make-buffer.js +++ b/test/addons/non-node-context/test-make-buffer.js @@ -3,7 +3,7 @@ const common = require('../../common'); const assert = require('assert'); const { - makeBufferInNewContext + makeBufferInNewContext, } = require(`./build/${common.buildType}/binding`); // Because the `Buffer` function and its protoype property only (currently) @@ -19,5 +19,5 @@ assert.throws( assert.strictEqual(exception.message, 'Buffer is not available for the current Context'); return true; - } + }, ); diff --git a/test/addons/openssl-client-cert-engine/test.js b/test/addons/openssl-client-cert-engine/test.js index e843e4bf433bff..648600c99cd852 100644 --- a/test/addons/openssl-client-cert-engine/test.js +++ b/test/addons/openssl-client-cert-engine/test.js @@ -26,7 +26,7 @@ const serverOptions = { cert: agentCert, ca: agentCa, requestCert: true, - rejectUnauthorized: true + rejectUnauthorized: true, }; const server = https.createServer(serverOptions, common.mustCall((req, res) => { @@ -40,7 +40,7 @@ const server = https.createServer(serverOptions, common.mustCall((req, res) => { path: '/test', clientCertEngine: engine, // `engine` will provide key+cert rejectUnauthorized: false, // Prevent failing on self-signed certificates - headers: {} + headers: {}, }; const req = https.request(clientOptions, common.mustCall((response) => { diff --git a/test/addons/openssl-key-engine/test.js b/test/addons/openssl-key-engine/test.js index 2cd7ddabc17095..58885e46728788 100644 --- a/test/addons/openssl-key-engine/test.js +++ b/test/addons/openssl-key-engine/test.js @@ -26,7 +26,7 @@ const serverOptions = { cert: agentCert, ca: agentCa, requestCert: true, - rejectUnauthorized: true + rejectUnauthorized: true, }; const server = https.createServer(serverOptions, common.mustCall((req, res) => { @@ -42,7 +42,7 @@ const server = https.createServer(serverOptions, common.mustCall((req, res) => { privateKeyIdentifier: 'dummykey', cert: agentCert, rejectUnauthorized: false, // Prevent failing on self-signed certificates - headers: {} + headers: {}, }; const req = https.request(clientOptions, common.mustCall((response) => { diff --git a/test/addons/repl-domain-abort/test.js b/test/addons/repl-domain-abort/test.js index f8e70ffce96e45..8d148432c31c21 100644 --- a/test/addons/repl-domain-abort/test.js +++ b/test/addons/repl-domain-abort/test.js @@ -63,7 +63,7 @@ const options = { input: dInput, output: dOutput, terminal: false, - ignoreUndefined: true + ignoreUndefined: true, }; // Run commands from fake REPL. diff --git a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-ascii.js b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-ascii.js index 024ba28aba04e0..6aff044519567e 100644 --- a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-ascii.js +++ b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-ascii.js @@ -32,5 +32,5 @@ assert.throws(() => { message: `Cannot create a string longer than 0x${stringLengthHex} ` + 'characters', code: 'ERR_STRING_TOO_LONG', - name: 'Error' + name: 'Error', }); diff --git a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-base64.js b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-base64.js index 20137636024987..7c8e2d92c6a4db 100644 --- a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-base64.js +++ b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-base64.js @@ -32,5 +32,5 @@ assert.throws(() => { message: `Cannot create a string longer than 0x${stringLengthHex} ` + 'characters', code: 'ERR_STRING_TOO_LONG', - name: 'Error' + name: 'Error', }); diff --git a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-binary.js b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-binary.js index 1ad04dc652873a..176c095e22e2ee 100644 --- a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-binary.js +++ b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-binary.js @@ -33,7 +33,7 @@ assert.throws(() => { message: `Cannot create a string longer than 0x${stringLengthHex} ` + 'characters', code: 'ERR_STRING_TOO_LONG', - name: 'Error' + name: 'Error', }); // FIXME: Free the memory early to avoid OOM. diff --git a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-hex.js b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-hex.js index 7e3132af09d172..a473e0e90fb220 100644 --- a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-hex.js +++ b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-hex.js @@ -32,5 +32,5 @@ assert.throws(() => { message: `Cannot create a string longer than 0x${stringLengthHex} ` + 'characters', code: 'ERR_STRING_TOO_LONG', - name: 'Error' + name: 'Error', }); diff --git a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-utf8.js b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-utf8.js index 78e73e0dc8557b..25271fad94b689 100644 --- a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-utf8.js +++ b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-utf8.js @@ -35,7 +35,7 @@ assert.throws(() => { message: `Cannot create a string longer than 0x${stringLengthHex} ` + 'characters', code: 'ERR_STRING_TOO_LONG', - name: 'Error' + name: 'Error', })(e); return true; } @@ -48,5 +48,5 @@ assert.throws(() => { message: `Cannot create a string longer than 0x${stringLengthHex} ` + 'characters', code: 'ERR_STRING_TOO_LONG', - name: 'Error' + name: 'Error', }); diff --git a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max.js b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max.js index 7206b90d5f28b6..b843be5a9ab7a5 100644 --- a/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max.js +++ b/test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max.js @@ -33,5 +33,5 @@ assert.throws(() => { message: `Cannot create a string longer than 0x${stringLengthHex} ` + 'characters', code: 'ERR_STRING_TOO_LONG', - name: 'Error' + name: 'Error', }); diff --git a/test/addons/worker-addon/test.js b/test/addons/worker-addon/test.js index 2d64c2f1c5187d..50191d183da544 100644 --- a/test/addons/worker-addon/test.js +++ b/test/addons/worker-addon/test.js @@ -13,12 +13,12 @@ switch (process.argv[2]) { case 'worker-twice': case 'worker': { const worker = new Worker(`require(${JSON.stringify(binding)});`, { - eval: true + eval: true, }); if (process.argv[2] === 'worker-twice') { worker.on('exit', common.mustCall(() => { new Worker(`require(${JSON.stringify(binding)});`, { - eval: true + eval: true, }); })); } @@ -52,7 +52,7 @@ for (const { test, expected } of [ 'ctor cleanup dtor ctor cleanup dtor ', ].concat(libcMayBeMusl ? [ 'ctor cleanup cleanup dtor ', - ] : []) + ] : []), }, ]) { console.log('spawning test', test);