Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! assert: refactor to avoid unsafe array iteration
  • Loading branch information
aduh95 committed Jan 3, 2021
commit 7c91e3cbae6545e13ae8415b1130e936957a1d6a
4 changes: 2 additions & 2 deletions lib/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -740,9 +740,9 @@ async function waitForActual(promiseFn) {
return NO_EXCEPTION_SENTINEL;
}

function expectsError(stackStartFn, actual, { 0: error, 1: message }) {
function expectsError(stackStartFn, actual, { 0: error, 1: message, length }) {
if (typeof error === 'string') {
if (arguments.length === 4) {
if (length === 2) {
throw new ERR_INVALID_ARG_TYPE('error',
['Object', 'Error', 'Function', 'RegExp'],
error);
Expand Down