Skip to content

Commit

Permalink
process: fix incorrect usage of assert.fail()
Browse files Browse the repository at this point in the history
The message argument for `assert.fail()` is the third argument, not the
first. Correct minor misuse in internal module.

PR-URL: #6211
Reviewed-By: Brian White <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
Trott authored and Myles Borins committed Apr 20, 2016
1 parent d516412 commit 1d40809
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/process/promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function setupPromises(scheduleMicrotasks) {
else if (event === promiseRejectEvent.handled)
rejectionHandled(promise);
else
require('assert').fail('unexpected PromiseRejectEvent');
require('assert').fail(null, null, 'unexpected PromiseRejectEvent');
});

function unhandledRejection(promise, reason) {
Expand Down

0 comments on commit 1d40809

Please sign in to comment.