Skip to content

Commit

Permalink
doc: mention prototype check in deepStrictEqual()
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
cjihrig authored and Myles Borins committed Mar 1, 2016
1 parent 77a172e commit 5a618e3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doc/api/assert.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ parameter is undefined, a default error message is assigned.

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

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

```js
const assert = require('assert');
Expand Down

0 comments on commit 5a618e3

Please sign in to comment.