Skip to content

Commit 4054c24

Browse files
prog1devMylesBorins
authored andcommitted
test: fix uses of deprecated assert.fail with multiple args
PR-URL: #23673 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
1 parent c417c7a commit 4054c24

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
@@ -68,7 +68,7 @@ const forAllClients = (cb) => common.mustCall(cb, CLIENT_VARIANTS);
6868
})
6969
.on('error', function(err) {
7070
console.error(err);
71-
assert.fail(null, null, `[Pipe server]${err}`);
71+
assert.fail(`[Pipe server]${err}`);
7272
})
7373
.listen({ path: serverPath }, common.mustCall(function serverOnListen() {
7474
const getSocketOpt = (index) => {
@@ -92,7 +92,7 @@ const forAllClients = (cb) => common.mustCall(cb, CLIENT_VARIANTS);
9292
console.error(`[Pipe]Sending data through fd ${oldHandle.fd}`);
9393
this.on('error', function(err) {
9494
console.error(err);
95-
assert.fail(null, null, `[Pipe Client]${err}`);
95+
assert.fail(`[Pipe Client]${err}`);
9696
});
9797
});
9898

test/parallel/test-string-decoder.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ function test(encoding, input, expected, singleSequence) {
217217
`input: ${input.toString('hex').match(hexNumberRE)}\n` +
218218
`Write sequence: ${JSON.stringify(sequence)}\n` +
219219
`Full Decoder State: ${inspect(decoder)}`;
220-
assert.fail(output, expected, message);
220+
assert.fail(message);
221221
}
222222
});
223223
}

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)