Skip to content

Commit 9af7ad5

Browse files
prog1devBridgeAR
authored andcommitted
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>
1 parent 2b0410a commit 9af7ad5

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

test/async-hooks/init-hooks.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,7 @@ class ActivityCollector {
120120
}
121121
if (violations.length) {
122122
console.error(violations.join('\n\n') + '\n');
123-
assert.fail(violations.length, 0,
124-
`${violations.length} failed sanity checks`);
123+
assert.fail(`${violations.length} failed sanity checks`);
125124
}
126125
}
127126

test/parallel/test-net-connect-options-fd.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const forAllClients = (cb) => common.mustCall(cb, CLIENT_VARIANTS);
7070
})
7171
.on('error', function(err) {
7272
console.error(err);
73-
assert.fail(null, null, `[Pipe server]${err}`);
73+
assert.fail(`[Pipe server]${err}`);
7474
})
7575
.listen({ path: serverPath }, common.mustCall(function serverOnListen() {
7676
const getSocketOpt = (index) => {
@@ -94,7 +94,7 @@ const forAllClients = (cb) => common.mustCall(cb, CLIENT_VARIANTS);
9494
console.error(`[Pipe]Sending data through fd ${oldHandle.fd}`);
9595
this.on('error', function(err) {
9696
console.error(err);
97-
assert.fail(null, null, `[Pipe Client]${err}`);
97+
assert.fail(`[Pipe Client]${err}`);
9898
});
9999
});
100100

test/parallel/test-string-decoder.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ function test(encoding, input, expected, singleSequence) {
228228
`input: ${input.toString('hex').match(hexNumberRE)}\n` +
229229
`Write sequence: ${JSON.stringify(sequence)}\n` +
230230
`Full Decoder State: ${inspect(decoder)}`;
231-
assert.fail(output, expected, message);
231+
assert.fail(message);
232232
}
233233
});
234234
}

test/pseudo-tty/test-tty-get-color-depth.js

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

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

87
const fd = common.getTTYfd();

0 commit comments

Comments
 (0)