Skip to content

Commit 1d40809

Browse files
TrottMyles Borins
authored and
Myles Borins
committed
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: #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]>
1 parent d516412 commit 1d40809

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/process/promises.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function setupPromises(scheduleMicrotasks) {
1313
else if (event === promiseRejectEvent.handled)
1414
rejectionHandled(promise);
1515
else
16-
require('assert').fail('unexpected PromiseRejectEvent');
16+
require('assert').fail(null, null, 'unexpected PromiseRejectEvent');
1717
});
1818

1919
function unhandledRejection(promise, reason) {

0 commit comments

Comments
 (0)