test: add trailing commas in test/pseudo-tty

PR-URL: https://github.com/nodejs/node/pull/46371
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Antoine du Hamel authored and Juan José Arboleda committed 2023-03-04 23:03:31 -05:00
1 parent 6f91c8e2ae
commit ed564a9985
13 files changed
+15 -16

No files matched your search

-1
View File
@@ -81,7 +81,6 @@ overrides:
- node-api/*/*.js
- parallel/*.js
- parallel/*.mjs
- pseudo-tty/*.js
- pummel/*.js
- sequential/*.js
- sequential/*.mjs
+1 -1
View File
@@ -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 {
+1 -1
View File
@@ -7,7 +7,7 @@ const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
output: process.stdout,
});
rl.write('text');
+1 -1
View File
@@ -17,7 +17,7 @@ repl.start('> ');
terminal: true,
input: stream,
output: process.stdout,
useColors: false
useColors: false,
});
replServer.on('close', common.mustCall());
+1 -1
View File
@@ -15,5 +15,5 @@ assert.throws(
'+ {}\n' +
'- {\n' +
'- foo: \'bar\'\n' +
'- }'
'- }',
});
@@ -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('^'),
);
@@ -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/)) {
@@ -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/)) {
+1 -1
View File
@@ -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/)) {
@@ -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);
+1 -1
View File
@@ -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));
+1 -1
View File
@@ -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');
+3 -3
View File
@@ -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));