★ wanayoo — archive 1999 https://github.com/nodejs/node/commit/9af7ad592cNouvelle recherche | Portail wanayoo
Skip to content
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
prog1dev authored and BridgeAR committed Nov 13, 2018
1 parent 2b0410a commit 9af7ad592c224918b096c975894e0d43fa51ab8e
Showing with 4 additions and 6 deletions.
  1. +1 −2 test/async-hooks/init-hooks.js
  2. +2 −2 test/parallel/test-net-connect-options-fd.js
  3. +1 −1 test/parallel/test-string-decoder.js
  4. +0 −1 test/pseudo-tty/test-tty-get-color-depth.js
@@ -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();

0 comments on commit 9af7ad5

Please sign in to comment.