Permalink
Browse files
test: fix uses of deprecated assert.fail with multiple args
PR-URL: #23673
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
- Loading branch information...
|
|
@@ -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`); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@@ -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) => { |
|
|
@@ -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}`); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
@@ -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); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
@@ -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(); |
|
|
|
0 comments on commit
4054c24