Skip to content
Permalink
Browse files

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 <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information...
Trott committed Apr 5, 2017
1 parent c6e0ba3 commit 971fe67dce26c01a8705292f748291e442003257
Showing with 5 additions and 0 deletions.
  1. +5 −0 test/parallel/test-assert-deep.js
@@ -107,6 +107,11 @@ for (const a of similar) {
}
}

assert.throws(
() => { assert.deepEqual(new Set([{a: 0}]), new Set([{a: 1}])); },
/^AssertionError: Set { { a: 0 } } deepEqual Set { { a: 1 } }$/
);

function assertDeepAndStrictEqual(a, b) {
assert.deepEqual(a, b);
assert.deepStrictEqual(a, b);

0 comments on commit 971fe67

Please sign in to comment.
You can’t perform that action at this time.