test: apply correct assert.fail() arguments

The assert.fail function signature has the message as the third argument
but, understandably, it is often assumed that it is the first argument
(or at least the first argument if no other arguments are passed).

This corrects the assert.fail() invocations in the Node.js tests.

Before:
assert.fail('message');
// result: AssertionError: 'message' undefined undefined

After:
assert.fail(null, null, 'message');
// result: AssertionError: message

PR-URL: https://github.com/nodejs/node/pull/3378
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Rich Trott 2015-10-14 21:22:55 -07:00
parent 0140e1b5e3
commit 676e61872f
13 changed files with 13 additions and 13 deletions

View file

@ -24,7 +24,7 @@ server.listen(common.PORT, '127.0.0.1', function() {
method: 'GET',
localAddress: invalidLocalAddress
}, function(res) {
assert.fail('unexpectedly got response from server');
assert.fail(null, null, 'unexpectedly got response from server');
}).on('error', function(e) {
console.log('client got error: ' + e.message);
gotError = true;