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: https://github.com/nodejs/node/issues/5365 PR-URL: https://github.com/nodejs/node/pull/5367 Reviewed-By: Robert Lindstädt <robert.lindstaedt@gmail.com> Reviewed-By: Benjamin Gruenbaum <inglor@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This commit is contained in:
parent
81e35b5a29
commit
10f55b0aae
@ -89,8 +89,9 @@ parameter is undefined, a default error message is assigned.
|
|||||||
|
|
||||||
## assert.deepStrictEqual(actual, expected[, message])
|
## assert.deepStrictEqual(actual, expected[, message])
|
||||||
|
|
||||||
Generally identical to [`assert.deepEqual()`][] with the exception that primitive
|
Generally identical to `assert.deepEqual()` with two exceptions. First,
|
||||||
values are compared using the strict equality operator ( `===` ).
|
primitive values are compared using the strict equality operator ( `===` ).
|
||||||
|
Second, object comparisons include a strict equality check of their prototypes.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const assert = require('assert');
|
const assert = require('assert');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user