Skip to content

Commit

Permalink
test: increase assert test coverage
Browse files Browse the repository at this point in the history
PR-URL: #24745
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
  • Loading branch information
BridgeAR committed Dec 5, 2018
1 parent 12feb9e commit 2916b59
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/parallel/test-assert-deep.js
Original file line number Diff line number Diff line change
Expand Up @@ -949,3 +949,17 @@ assert.deepStrictEqual(obj1, obj2);
arr[2 ** 32] = true;
assertNotDeepOrStrict(arr, [1, 2, 3]);
}

assert.throws(
() => assert.deepStrictEqual([1, 2, 3], [1, 2]),
{
code: 'ERR_ASSERTION',
name: 'AssertionError [ERR_ASSERTION]',
message: `${defaultMsgStartFull}\n\n` +
' [\n' +
' 1,\n' +
' 2,\n' +
'+ 3\n' +
' ]'
}
);

0 comments on commit 2916b59

Please sign in to comment.