mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05: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:
1 parent
bc29aad22b
commit
74eb632483
13 files changed
+13
-13
No files matched your search
@@ -35,7 +35,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;
|
||||
|
||||
Reference in new issue
Block a user