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 <mscdex@mscdex.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
Trott authored and jasnell committed Apr 18, 2016
1 parent eafd31a commit b7f4b1b
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 b7f4b1b

Please sign in to comment.