Closed
Description
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