Skip to content

Commit 2916b59

Browse files
committed
test: increase assert test coverage
PR-URL: #24745 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
1 parent 12feb9e commit 2916b59

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/parallel/test-assert-deep.js

+14
Original file line numberDiff line numberDiff line change
@@ -949,3 +949,17 @@ assert.deepStrictEqual(obj1, obj2);
949949
arr[2 ** 32] = true;
950950
assertNotDeepOrStrict(arr, [1, 2, 3]);
951951
}
952+
953+
assert.throws(
954+
() => assert.deepStrictEqual([1, 2, 3], [1, 2]),
955+
{
956+
code: 'ERR_ASSERTION',
957+
name: 'AssertionError [ERR_ASSERTION]',
958+
message: `${defaultMsgStartFull}\n\n` +
959+
' [\n' +
960+
' 1,\n' +
961+
' 2,\n' +
962+
'+ 3\n' +
963+
' ]'
964+
}
965+
);

0 commit comments

Comments
 (0)