Skip to content

Commit ed564a9

Browse files
aduh95juanarbol
authored andcommitted
test: add trailing commas in test/pseudo-tty
PR-URL: #46371 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 6f91c8e commit ed564a9

13 files changed

+15
-16
lines changed

test/.eslintrc.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ overrides:
8181
- node-api/*/*.js
8282
- parallel/*.js
8383
- parallel/*.mjs
84-
- pseudo-tty/*.js
8584
- pummel/*.js
8685
- sequential/*.js
8786
- sequential/*.mjs

test/pseudo-tty/console_colors.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ console.log('%s q', 'string');
1010
console.log('%o with object format param', { foo: 'bar' });
1111

1212
console.log(
13-
new Error('test\n at abc (../fixtures/node_modules/bar.js:4:4)\nfoobar')
13+
new Error('test\n at abc (../fixtures/node_modules/bar.js:4:4)\nfoobar'),
1414
);
1515

1616
try {

test/pseudo-tty/readline-dumb-tty.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const readline = require('readline');
77

88
const rl = readline.createInterface({
99
input: process.stdin,
10-
output: process.stdout
10+
output: process.stdout,
1111
});
1212

1313
rl.write('text');

test/pseudo-tty/repl-dumb-tty.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repl.start('> ');
1717
terminal: true,
1818
input: stream,
1919
output: process.stdout,
20-
useColors: false
20+
useColors: false,
2121
});
2222

2323
replServer.on('close', common.mustCall());

test/pseudo-tty/test-assert-no-color.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ assert.throws(
1515
'+ {}\n' +
1616
'- {\n' +
1717
'- foo: \'bar\'\n' +
18-
'- }'
18+
'- }',
1919
});

test/pseudo-tty/test-assert-position-indicator.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ process.stderr.columns = 20;
88
// Confirm that there is no position indicator.
99
assert.throws(
1010
() => { assert.strictEqual('a'.repeat(30), 'a'.repeat(31)); },
11-
(err) => !err.message.includes('^')
11+
(err) => !err.message.includes('^'),
1212
);
1313

1414
// Confirm that there is a position indicator.
1515
assert.throws(
1616
() => { assert.strictEqual('aaaa', 'aaaaa'); },
17-
(err) => err.message.includes('^')
17+
(err) => err.message.includes('^'),
1818
);

test/pseudo-tty/test-set-raw-mode-reset-process-exit.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ child_process.spawnSync(process.execPath, [
1010

1111
const { stdout } = child_process.spawnSync('stty', {
1212
stdio: ['inherit', 'pipe', 'inherit'],
13-
encoding: 'utf8'
13+
encoding: 'utf8',
1414
});
1515

1616
if (stdout.match(/-echo\b/)) {

test/pseudo-tty/test-set-raw-mode-reset-signal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ proc.stdout.on('data', common.mustCall(() => {
1515
proc.on('exit', common.mustCall(() => {
1616
const { stdout } = child_process.spawnSync('stty', {
1717
stdio: ['inherit', 'pipe', 'inherit'],
18-
encoding: 'utf8'
18+
encoding: 'utf8',
1919
});
2020

2121
if (stdout.match(/-echo\b/)) {

test/pseudo-tty/test-set-raw-mode-reset.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ child_process.spawnSync(process.execPath, [
1111

1212
const { stdout } = child_process.spawnSync('stty', {
1313
stdio: ['inherit', 'pipe', 'inherit'],
14-
encoding: 'utf8'
14+
encoding: 'utf8',
1515
});
1616

1717
if (stdout.match(/-echo\b/)) {

test/pseudo-tty/test-trace-sigint-disabled.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if (process.env.CHILD === 'true') {
1414
['--trace-sigint', __filename],
1515
{
1616
env: { ...process.env, CHILD: 'true' },
17-
stdio: 'inherit'
17+
stdio: 'inherit',
1818
});
1919
cp.on('exit', mustCall((code, signal) => {
2020
assert.strictEqual(signal, null);

test/pseudo-tty/test-trace-sigint-on-idle.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if (process.env.CHILD === 'true') {
1313
['--trace-sigint', __filename],
1414
{
1515
env: { ...process.env, CHILD: 'true' },
16-
stdio: ['inherit', 'inherit', 'inherit', 'ipc']
16+
stdio: ['inherit', 'inherit', 'inherit', 'ipc'],
1717
});
1818
cp.on('message', mustCall(() => {
1919
setTimeout(() => cp.kill('SIGINT'), platformTimeout(100));

test/pseudo-tty/test-trace-sigint.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if (process.env.CHILD === 'true') {
1414
['--trace-sigint', __filename],
1515
{
1616
env: { ...process.env, CHILD: 'true' },
17-
stdio: 'inherit'
17+
stdio: 'inherit',
1818
});
1919
cp.on('exit', mustCall((code, signal) => {
2020
assert.strictEqual(signal, 'SIGINT');

test/pseudo-tty/test-tty-color-support.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ const writeStream = new WriteStream(fd);
2121
[true, null, () => {}, Symbol(), 5n].forEach((input) => {
2222
assert.throws(
2323
() => writeStream.hasColors(input),
24-
{ code: 'ERR_INVALID_ARG_TYPE' }
24+
{ code: 'ERR_INVALID_ARG_TYPE' },
2525
);
2626
});
2727

2828
[-1, 1].forEach((input) => {
2929
assert.throws(
3030
() => writeStream.hasColors(input),
31-
{ code: 'ERR_OUT_OF_RANGE' }
31+
{ code: 'ERR_OUT_OF_RANGE' },
3232
);
3333
});
3434

@@ -78,7 +78,7 @@ const writeStream = new WriteStream(fd);
7878
actual,
7979
depth,
8080
`i: ${i}, expected: ${depth}, ` +
81-
`actual: ${actual}, env: ${inspect(env)}`
81+
`actual: ${actual}, env: ${inspect(env)}`,
8282
);
8383
const colors = 2 ** actual;
8484
assert(writeStream.hasColors(colors, env));

0 commit comments

Comments
 (0)