test: increase assert test coverage
PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
b05b330025
commit
15b0247363
@ -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' +
|
||||
' ]'
|
||||
}
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user