Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4deb054

Browse filesBrowse 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 <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>
1 parent 3d0cf9e commit 4deb054
Copy full SHA for 4deb054

File tree

Expand file treeCollapse file tree

1 file changed

+15
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+15
-0
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-assert.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-assert.js
+15Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.