Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: assert.deepStrictEqual() description inaccurate #5365

Closed
jmm opened this issue Feb 22, 2016 · 0 comments
Closed

doc: assert.deepStrictEqual() description inaccurate #5365

jmm opened this issue Feb 22, 2016 · 0 comments
Labels
assert Issues and PRs related to the assert subsystem. doc Issues and PRs related to the documentations.

Comments

@jmm
Copy link
Contributor

jmm commented Feb 22, 2016

deepStrictEqual() description currently begins with:

Generally identical to assert.deepEqual() with the exception that primitive
values are compared using the strict equality operator ( === ).

But, deepStrictEqual() also compares prototype equality. Example (v5.6.0):

var assert = require("assert");

var a = [0];
var b = {0: 0};

["deepEqual", "deepStrictEqual"].forEach(function (meth) {
  assert[meth](a, b, "not " + meth);
});
// AssertionError: not deepStrictEqual
@mscdex mscdex added assert Issues and PRs related to the assert subsystem. doc Issues and PRs related to the documentations. labels Feb 22, 2016
cjihrig added a commit to cjihrig/node that referenced this issue Feb 22, 2016
The docs for assert.deepStrictEqual() do not currently mention
that prototypes are compared for objects. This commit adds that
information to the documentation.

Fixes: nodejs#5365
rvagg pushed a commit that referenced this issue Feb 27, 2016
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>
rvagg pushed a commit that referenced this issue Feb 27, 2016
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>
MylesBorins pushed a commit that referenced this issue Mar 1, 2016
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>
MylesBorins pushed a commit that referenced this issue Mar 1, 2016
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>
MylesBorins pushed a commit that referenced this issue Mar 2, 2016
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assert Issues and PRs related to the assert subsystem. doc Issues and PRs related to the documentations.
Projects
None yet
Development

No branches or pull requests

2 participants