Skip to content

Commit 558f7d9

Browse files
TrottMylesBorins
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 49c4886 commit 558f7d9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/parallel/test-assert.js

+15
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,21 @@ assert.throws(makeBlock(a.deepEqual, new Date(), new Date(2000, 3, 14)),
7171
a.AssertionError,
7272
'deepEqual(new Date(), new Date(2000, 3, 14))');
7373

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

0 commit comments

Comments
 (0)