Skip to content

Commit 971fe67

Browse files
committed
test: complete coverage for lib/assert.js
6481c93 modified `lib/assert.js` and added some tests for new functionality, but left a single line uncovered by tests. This adds a test that covers the currently-uncovered line (which is the final `return` statement in `setHasSimilarElement()`).` PR-URL: #12239 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent c6e0ba3 commit 971fe67

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/parallel/test-assert-deep.js

+5
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ for (const a of similar) {
107107
}
108108
}
109109

110+
assert.throws(
111+
() => { assert.deepEqual(new Set([{a: 0}]), new Set([{a: 1}])); },
112+
/^AssertionError: Set { { a: 0 } } deepEqual Set { { a: 1 } }$/
113+
);
114+
110115
function assertDeepAndStrictEqual(a, b) {
111116
assert.deepEqual(a, b);
112117
assert.deepStrictEqual(a, b);

0 commit comments

Comments
 (0)