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 <robert.lindstaedt@gmail.com>
Reviewed-By: Benjamin Gruenbaum <inglor@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
  • Loading branch information
cjihrig committed Feb 23, 2016
1 parent 81e35b5 commit 10f55b0
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 10f55b0

Please sign in to comment.