Skip to content

Commit 10f55b0

Browse 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 <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
1 parent 81e35b5 commit 10f55b0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

doc/api/assert.markdown

+3-2
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)