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:
parent
936ac681b2
commit
53d424a328
@ -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`);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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}`);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user