From ed564a998562be01cdc69d7478064a71e2d281ac Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Sun, 29 Jan 2023 20:14:30 +0200 Subject: [PATCH] test: add trailing commas in `test/pseudo-tty` PR-URL: https://github.com/nodejs/node/pull/46371 Reviewed-By: Moshe Atlow Reviewed-By: James M Snell --- test/.eslintrc.yaml | 1 - test/pseudo-tty/console_colors.js | 2 +- test/pseudo-tty/readline-dumb-tty.js | 2 +- test/pseudo-tty/repl-dumb-tty.js | 2 +- test/pseudo-tty/test-assert-no-color.js | 2 +- test/pseudo-tty/test-assert-position-indicator.js | 4 ++-- test/pseudo-tty/test-set-raw-mode-reset-process-exit.js | 2 +- test/pseudo-tty/test-set-raw-mode-reset-signal.js | 2 +- test/pseudo-tty/test-set-raw-mode-reset.js | 2 +- test/pseudo-tty/test-trace-sigint-disabled.js | 2 +- test/pseudo-tty/test-trace-sigint-on-idle.js | 2 +- test/pseudo-tty/test-trace-sigint.js | 2 +- test/pseudo-tty/test-tty-color-support.js | 6 +++--- 13 files changed, 15 insertions(+), 16 deletions(-) diff --git a/test/.eslintrc.yaml b/test/.eslintrc.yaml index cfd28738eff015..306975f794c710 100644 --- a/test/.eslintrc.yaml +++ b/test/.eslintrc.yaml @@ -81,7 +81,6 @@ overrides: - node-api/*/*.js - parallel/*.js - parallel/*.mjs - - pseudo-tty/*.js - pummel/*.js - sequential/*.js - sequential/*.mjs diff --git a/test/pseudo-tty/console_colors.js b/test/pseudo-tty/console_colors.js index e525bed59c9d4f..d819e06c4f1cb5 100644 --- a/test/pseudo-tty/console_colors.js +++ b/test/pseudo-tty/console_colors.js @@ -10,7 +10,7 @@ console.log('%s q', 'string'); console.log('%o with object format param', { foo: 'bar' }); console.log( - new Error('test\n at abc (../fixtures/node_modules/bar.js:4:4)\nfoobar') + new Error('test\n at abc (../fixtures/node_modules/bar.js:4:4)\nfoobar'), ); try { diff --git a/test/pseudo-tty/readline-dumb-tty.js b/test/pseudo-tty/readline-dumb-tty.js index 6b9a3b59ad96e8..b3215415ea3a4e 100644 --- a/test/pseudo-tty/readline-dumb-tty.js +++ b/test/pseudo-tty/readline-dumb-tty.js @@ -7,7 +7,7 @@ const readline = require('readline'); const rl = readline.createInterface({ input: process.stdin, - output: process.stdout + output: process.stdout, }); rl.write('text'); diff --git a/test/pseudo-tty/repl-dumb-tty.js b/test/pseudo-tty/repl-dumb-tty.js index 7fb96457151a4e..7563ea43402de2 100644 --- a/test/pseudo-tty/repl-dumb-tty.js +++ b/test/pseudo-tty/repl-dumb-tty.js @@ -17,7 +17,7 @@ repl.start('> '); terminal: true, input: stream, output: process.stdout, - useColors: false + useColors: false, }); replServer.on('close', common.mustCall()); diff --git a/test/pseudo-tty/test-assert-no-color.js b/test/pseudo-tty/test-assert-no-color.js index c4e782b560fc41..698d29ab8dbceb 100644 --- a/test/pseudo-tty/test-assert-no-color.js +++ b/test/pseudo-tty/test-assert-no-color.js @@ -15,5 +15,5 @@ assert.throws( '+ {}\n' + '- {\n' + '- foo: \'bar\'\n' + - '- }' + '- }', }); diff --git a/test/pseudo-tty/test-assert-position-indicator.js b/test/pseudo-tty/test-assert-position-indicator.js index 68baecbd7b445a..9909fee2b4ae72 100644 --- a/test/pseudo-tty/test-assert-position-indicator.js +++ b/test/pseudo-tty/test-assert-position-indicator.js @@ -8,11 +8,11 @@ process.stderr.columns = 20; // Confirm that there is no position indicator. assert.throws( () => { assert.strictEqual('a'.repeat(30), 'a'.repeat(31)); }, - (err) => !err.message.includes('^') + (err) => !err.message.includes('^'), ); // Confirm that there is a position indicator. assert.throws( () => { assert.strictEqual('aaaa', 'aaaaa'); }, - (err) => err.message.includes('^') + (err) => err.message.includes('^'), ); 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 1f80ab304d540d..32a56bf2d56cd7 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 @@ -10,7 +10,7 @@ child_process.spawnSync(process.execPath, [ const { stdout } = child_process.spawnSync('stty', { stdio: ['inherit', 'pipe', 'inherit'], - encoding: 'utf8' + encoding: 'utf8', }); if (stdout.match(/-echo\b/)) { 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 8b666f3ee0a8c3..7c4a315c5457e3 100644 --- a/test/pseudo-tty/test-set-raw-mode-reset-signal.js +++ b/test/pseudo-tty/test-set-raw-mode-reset-signal.js @@ -15,7 +15,7 @@ proc.stdout.on('data', common.mustCall(() => { proc.on('exit', common.mustCall(() => { const { stdout } = child_process.spawnSync('stty', { stdio: ['inherit', 'pipe', 'inherit'], - encoding: 'utf8' + encoding: 'utf8', }); if (stdout.match(/-echo\b/)) { diff --git a/test/pseudo-tty/test-set-raw-mode-reset.js b/test/pseudo-tty/test-set-raw-mode-reset.js index 7cd9bba80672fe..28055ab52bb32a 100644 --- a/test/pseudo-tty/test-set-raw-mode-reset.js +++ b/test/pseudo-tty/test-set-raw-mode-reset.js @@ -11,7 +11,7 @@ child_process.spawnSync(process.execPath, [ const { stdout } = child_process.spawnSync('stty', { stdio: ['inherit', 'pipe', 'inherit'], - encoding: 'utf8' + encoding: 'utf8', }); if (stdout.match(/-echo\b/)) { diff --git a/test/pseudo-tty/test-trace-sigint-disabled.js b/test/pseudo-tty/test-trace-sigint-disabled.js index 5dc4dfa9b36afa..fdc7480d83b074 100644 --- a/test/pseudo-tty/test-trace-sigint-disabled.js +++ b/test/pseudo-tty/test-trace-sigint-disabled.js @@ -14,7 +14,7 @@ if (process.env.CHILD === 'true') { ['--trace-sigint', __filename], { env: { ...process.env, CHILD: 'true' }, - stdio: 'inherit' + stdio: 'inherit', }); cp.on('exit', mustCall((code, signal) => { assert.strictEqual(signal, null); diff --git a/test/pseudo-tty/test-trace-sigint-on-idle.js b/test/pseudo-tty/test-trace-sigint-on-idle.js index 5f79cb82fe95db..8d9bbb3a5d2e82 100644 --- a/test/pseudo-tty/test-trace-sigint-on-idle.js +++ b/test/pseudo-tty/test-trace-sigint-on-idle.js @@ -13,7 +13,7 @@ if (process.env.CHILD === 'true') { ['--trace-sigint', __filename], { env: { ...process.env, CHILD: 'true' }, - stdio: ['inherit', 'inherit', 'inherit', 'ipc'] + stdio: ['inherit', 'inherit', 'inherit', 'ipc'], }); cp.on('message', mustCall(() => { setTimeout(() => cp.kill('SIGINT'), platformTimeout(100)); diff --git a/test/pseudo-tty/test-trace-sigint.js b/test/pseudo-tty/test-trace-sigint.js index 4c715973e8bf93..7429378233f9ec 100644 --- a/test/pseudo-tty/test-trace-sigint.js +++ b/test/pseudo-tty/test-trace-sigint.js @@ -14,7 +14,7 @@ if (process.env.CHILD === 'true') { ['--trace-sigint', __filename], { env: { ...process.env, CHILD: 'true' }, - stdio: 'inherit' + stdio: 'inherit', }); cp.on('exit', mustCall((code, signal) => { assert.strictEqual(signal, 'SIGINT'); diff --git a/test/pseudo-tty/test-tty-color-support.js b/test/pseudo-tty/test-tty-color-support.js index 57ed640d4d813f..f846842ee015d8 100644 --- a/test/pseudo-tty/test-tty-color-support.js +++ b/test/pseudo-tty/test-tty-color-support.js @@ -21,14 +21,14 @@ const writeStream = new WriteStream(fd); [true, null, () => {}, Symbol(), 5n].forEach((input) => { assert.throws( () => writeStream.hasColors(input), - { code: 'ERR_INVALID_ARG_TYPE' } + { code: 'ERR_INVALID_ARG_TYPE' }, ); }); [-1, 1].forEach((input) => { assert.throws( () => writeStream.hasColors(input), - { code: 'ERR_OUT_OF_RANGE' } + { code: 'ERR_OUT_OF_RANGE' }, ); }); @@ -78,7 +78,7 @@ const writeStream = new WriteStream(fd); actual, depth, `i: ${i}, expected: ${depth}, ` + - `actual: ${actual}, env: ${inspect(env)}` + `actual: ${actual}, env: ${inspect(env)}`, ); const colors = 2 ** actual; assert(writeStream.hasColors(colors, env));