Skip to content

Commit

Permalink
test: fix uses of deprecated assert.fail with multiple args
Browse files Browse the repository at this point in the history
PR-URL: #23673
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
  • Loading branch information
prog1dev authored and MylesBorins committed Dec 26, 2018
1 parent c417c7a commit 4054c24
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
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 @@ -68,7 +68,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 @@ -92,7 +92,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 @@ -217,7 +217,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
1 change: 0 additions & 1 deletion test/pseudo-tty/test-tty-get-color-depth.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

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

const fd = common.getTTYfd();
Expand Down

0 comments on commit 4054c24

Please sign in to comment.