Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add trailing commas in test/pseudo-tty #46371

Merged
merged 1 commit into from
Jan 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion test/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ overrides:
- node-api/*/*.js
- parallel/*.js
- parallel/*.mjs
- pseudo-tty/*.js
- pummel/*.js
- sequential/*.js
- sequential/*.mjs
Expand Down
2 changes: 1 addition & 1 deletion test/pseudo-tty/console_colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion test/pseudo-tty/readline-dumb-tty.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const readline = require('readline');

const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
output: process.stdout,
});

rl.write('text');
Expand Down
2 changes: 1 addition & 1 deletion test/pseudo-tty/repl-dumb-tty.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repl.start('> ');
terminal: true,
input: stream,
output: process.stdout,
useColors: false
useColors: false,
});

replServer.on('close', common.mustCall());
Expand Down
2 changes: 1 addition & 1 deletion test/pseudo-tty/test-assert-no-color.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ assert.throws(
'+ {}\n' +
'- {\n' +
'- foo: \'bar\'\n' +
'- }'
'- }',
});
4 changes: 2 additions & 2 deletions test/pseudo-tty/test-assert-position-indicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('^'),
);
2 changes: 1 addition & 1 deletion test/pseudo-tty/test-set-raw-mode-reset-process-exit.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/)) {
Expand Down
2 changes: 1 addition & 1 deletion test/pseudo-tty/test-set-raw-mode-reset-signal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/)) {
Expand Down
2 changes: 1 addition & 1 deletion test/pseudo-tty/test-set-raw-mode-reset.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/)) {
Expand Down
2 changes: 1 addition & 1 deletion test/pseudo-tty/test-trace-sigint-disabled.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion test/pseudo-tty/test-trace-sigint-on-idle.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion test/pseudo-tty/test-trace-sigint.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
6 changes: 3 additions & 3 deletions test/pseudo-tty/test-tty-color-support.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
);
});

Expand Down Expand Up @@ -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));
Expand Down