Skip to content

Commit 4deb054

Browse files
Trottevanlucas
authored andcommitted
test: add assert.notDeepEqual() tests
There are currently no tests for assert.notDeepEqual(). Add some minimal tests. PR-URL: #8156 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Claudio Rodriguez <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 3d0cf9e commit 4deb054

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/parallel/test-assert.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,21 @@ assert.throws(makeBlock(a.deepEqual, new Date(), new Date(2000, 3, 14)),
7272
a.AssertionError,
7373
'deepEqual(new Date(), new Date(2000, 3, 14))');
7474

75+
assert.throws(makeBlock(
76+
a.notDeepEqual,
77+
new Date(2000, 3, 14),
78+
new Date(2000, 3, 14)),
79+
a.AssertionError,
80+
'notDeepEqual(new Date(2000, 3, 14), new Date(2000, 3, 14))'
81+
);
82+
83+
assert.doesNotThrow(makeBlock(
84+
a.notDeepEqual,
85+
new Date(),
86+
new Date(2000, 3, 14)),
87+
'notDeepEqual(new Date(), new Date(2000, 3, 14))'
88+
);
89+
7590
// 7.3
7691
assert.doesNotThrow(makeBlock(a.deepEqual, /a/, /a/));
7792
assert.doesNotThrow(makeBlock(a.deepEqual, /a/g, /a/g));

0 commit comments

Comments
 (0)