Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions test/async-hooks/init-hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ class ActivityCollector {
}
if (violations.length) {
console.error(violations.join('\n\n') + '\n');
assert.fail(violations.length, 0,
`${violations.length} failed sanity checks`);
assert.fail(`${violations.length} failed sanity checks`);
}
}

Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-net-connect-options-fd.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const forAllClients = (cb) => common.mustCall(cb, CLIENT_VARIANTS);
})
.on('error', function(err) {
console.error(err);
assert.fail(null, null, `[Pipe server]${err}`);
assert.fail(`[Pipe server]${err}`);
})
.listen({ path: serverPath }, common.mustCall(function serverOnListen() {
const getSocketOpt = (index) => {
Expand All @@ -94,7 +94,7 @@ const forAllClients = (cb) => common.mustCall(cb, CLIENT_VARIANTS);
console.error(`[Pipe]Sending data through fd ${oldHandle.fd}`);
this.on('error', function(err) {
console.error(err);
assert.fail(null, null, `[Pipe Client]${err}`);
assert.fail(`[Pipe Client]${err}`);
});
});

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-string-decoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ function test(encoding, input, expected, singleSequence) {
`input: ${input.toString('hex').match(hexNumberRE)}\n` +
`Write sequence: ${JSON.stringify(sequence)}\n` +
`Full Decoder State: ${inspect(decoder)}`;
assert.fail(output, expected, message);
assert.fail(message);
}
});
}
Expand Down
9 changes: 4 additions & 5 deletions test/pseudo-tty/test-tty-get-color-depth.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

const common = require('../common');
const assert = require('assert').strict;
/* eslint-disable no-restricted-properties */
const { WriteStream } = require('tty');

const fd = common.getTTYfd();
const writeStream = new WriteStream(fd);

{
const depth = writeStream.getColorDepth();
assert.equal(typeof depth, 'number');
assert.strictEqual(typeof depth, 'number');
assert(depth >= 1 && depth <= 24);
}

Expand Down Expand Up @@ -44,7 +43,7 @@ const writeStream = new WriteStream(fd);
[{ TERM: 'dumb', COLORTERM: '1' }, 4],
].forEach(([env, depth], i) => {
const actual = writeStream.getColorDepth(env);
assert.equal(
assert.strictEqual(
actual,
depth,
`i: ${i}, expected: ${depth}, actual: ${actual}, env: ${env}`
Expand All @@ -57,8 +56,8 @@ const writeStream = new WriteStream(fd);
const [ value, depth1, depth2 ] = process.platform !== 'win32' ?
['win32', 1, 4] : ['linux', 4, 1];

assert.equal(writeStream.getColorDepth({}), depth1);
assert.strictEqual(writeStream.getColorDepth({}), depth1);
Object.defineProperty(process, 'platform', { value });
assert.equal(writeStream.getColorDepth({}), depth2);
assert.strictEqual(writeStream.getColorDepth({}), depth2);
Object.defineProperty(process, 'platform', platform);
}