Browse Source

process: fix incorrect usage of assert.fail()

The message argument for `assert.fail()` is the third argument, not the
first. Correct minor misuse in internal module.

PR-URL: https://github.com/nodejs/node/pull/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>
process-exit-stdio-flushing
Rich Trott 9 years ago
committed by James M Snell
parent
commit
b7f4b1ba4c
  1. 2
      lib/internal/process/promises.js

2
lib/internal/process/promises.js

@ -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) {

Loading…
Cancel
Save