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 10f55b0

Browse filesBrowse files
committed
doc: mention prototype check in deepStrictEqual()
The docs for assert.deepStrictEqual() do not currently mention that prototypes are compared for objects. This commit adds that information to the documentation. Fixes: #5365 PR-URL: #5367 Reviewed-By: Robert Lindstädt <robert.lindstaedt@gmail.com> Reviewed-By: Benjamin Gruenbaum <inglor@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
1 parent 81e35b5 commit 10f55b0
Copy full SHA for 10f55b0

File tree

Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Open diff view settings
Collapse file

‎doc/api/assert.markdown‎

Copy file name to clipboardExpand all lines: doc/api/assert.markdown
+3-2Lines changed: 3 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ parameter is undefined, a default error message is assigned.
8989

9090
## assert.deepStrictEqual(actual, expected[, message])
9191

92-
Generally identical to [`assert.deepEqual()`][] with the exception that primitive
93-
values are compared using the strict equality operator ( `===` ).
92+
Generally identical to `assert.deepEqual()` with two exceptions. First,
93+
primitive values are compared using the strict equality operator ( `===` ).
94+
Second, object comparisons include a strict equality check of their prototypes.
9495

9596
```js
9697
const assert = require('assert');

0 commit comments

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