test: fix uses of deprecated assert.fail with multiple args

PR-URL: https://github.com/nodejs/node/pull/23673
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
This commit is contained in:
ivan.filenko 2018-10-15 20:32:30 +03:00 committed by Refael Ackermann
parent 936ac681b2
commit 53d424a328
4 changed files with 4 additions and 6 deletions

View File

@ -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`);
}
}

View File

@ -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) => {
@ -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}`);
});
});

View File

@ -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);
}
});
}

View File

@ -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();