Skip to content

Commit

Permalink
test: add assert.notDeepEqual() tests
Browse files Browse the repository at this point in the history
There are currently no tests for assert.notDeepEqual(). Add some minimal
tests.

PR-URL: #8156
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Trott authored and MylesBorins committed Oct 26, 2016
1 parent 49c4886 commit 558f7d9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/parallel/test-assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,21 @@ assert.throws(makeBlock(a.deepEqual, new Date(), new Date(2000, 3, 14)),
a.AssertionError,
'deepEqual(new Date(), new Date(2000, 3, 14))');

assert.throws(makeBlock(
a.notDeepEqual,
new Date(2000, 3, 14),
new Date(2000, 3, 14)),
a.AssertionError,
'notDeepEqual(new Date(2000, 3, 14), new Date(2000, 3, 14))'
);

assert.doesNotThrow(makeBlock(
a.notDeepEqual,
new Date(),
new Date(2000, 3, 14)),
'notDeepEqual(new Date(), new Date(2000, 3, 14))'
);

// 7.3
assert.doesNotThrow(makeBlock(a.deepEqual, /a/, /a/));
assert.doesNotThrow(makeBlock(a.deepEqual, /a/g, /a/g));
Expand Down

0 comments on commit 558f7d9

Please sign in to comment.