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 a6f8379

Browse filesBrowse files
Trottevanlucas
authored andcommitted
test: add assert.notDeepStrictEqual() tests
There is no test coverage for `assert.notDeepStrictEqual()`. Add some minimal tests. PR-URL: #8177 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 29a7196 commit a6f8379
Copy full SHA for a6f8379

File tree

Expand file treeCollapse file tree

1 file changed

+20
-7
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+20
-7
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
+20-7Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -184,14 +184,27 @@ assert.doesNotThrow(makeBlock(a.deepEqual, new Boolean(true), {}),
184184
assert.throws(makeBlock(a.deepEqual, {a: 1}, {b: 1}), a.AssertionError);
185185

186186
//deepStrictEqual
187-
assert.doesNotThrow(makeBlock(a.deepStrictEqual, new Date(2000, 3, 14),
188-
new Date(2000, 3, 14)),
189-
'deepStrictEqual(new Date(2000, 3, 14),\
190-
new Date(2000, 3, 14))');
187+
assert.doesNotThrow(
188+
makeBlock(a.deepStrictEqual, new Date(2000, 3, 14), new Date(2000, 3, 14)),
189+
'deepStrictEqual(new Date(2000, 3, 14), new Date(2000, 3, 14))'
190+
);
191191

192-
assert.throws(makeBlock(a.deepStrictEqual, new Date(), new Date(2000, 3, 14)),
193-
a.AssertionError,
194-
'deepStrictEqual(new Date(), new Date(2000, 3, 14))');
192+
assert.throws(
193+
makeBlock(a.deepStrictEqual, new Date(), new Date(2000, 3, 14)),
194+
a.AssertionError,
195+
'deepStrictEqual(new Date(), new Date(2000, 3, 14))'
196+
);
197+
198+
assert.throws(
199+
makeBlock(a.notDeepStrictEqual, new Date(2000, 3, 14), new Date(2000, 3, 14)),
200+
a.AssertionError,
201+
'notDeepStrictEqual(new Date(2000, 3, 14), new Date(2000, 3, 14))'
202+
);
203+
204+
assert.doesNotThrow(
205+
makeBlock(a.notDeepStrictEqual, new Date(), new Date(2000, 3, 14)),
206+
'notDeepStrictEqual(new Date(), new Date(2000, 3, 14))'
207+
);
195208

196209
// 7.3 - strict
197210
assert.doesNotThrow(makeBlock(a.deepStrictEqual, /a/, /a/));

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.