Skip to content

Commit ccea4ca

Browse files
committed
test: add assert.deepStrictEqual test cases to cover more cases
1 parent c9b2d34 commit ccea4ca

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/parallel/test-assert-deep.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,18 @@ test('es6 Maps and Sets', () => {
406406
new Set([xarray, ['y']]),
407407
new Set([xarray, ['y']])
408408
);
409+
assertDeepAndStrictEqual(
410+
new Set([2, xarray, ['y'], 1]),
411+
new Set([xarray, ['y'], 1, 2])
412+
);
413+
assertDeepAndStrictEqual(
414+
new Set([{ a: 1 }, { a: 3 }, { a: 2 }, { a: 4 }]),
415+
new Set([{ a: 2 }, { a: 1 }, { a: 4 }, { a: 3 }])
416+
);
417+
assertNotDeepOrStrict(
418+
new Set([{ a: 1 }, { a: 2 }, { a: 3 }, { a: 4 }]),
419+
new Set([{ a: 1 }, { a: 2 }, { a: 3 }, { a: 5 }])
420+
);
409421
assertOnlyDeepEqual(
410422
new Set([null, '', 1n, 5, 2n, false]),
411423
new Set([undefined, 0, 5n, true, '2', '-000'])

0 commit comments

Comments
 (0)