mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 21:58:48 +02:00
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:
parent
0140e1b5e3
commit
676e61872f
13 changed files with 13 additions and 13 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue