We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ac40b9 commit cd740a2Copy full SHA for cd740a2
test/parallel/test-assert-deep.js
@@ -1050,6 +1050,21 @@ assert.throws(
1050
assert.deepStrictEqual(a, b);
1051
}
1052
1053
+// Verify that an array and the equivalent fake array object
1054
+// are correctly compared
1055
+{
1056
+ const a = [1, 2, 3];
1057
+ const o = {
1058
+ __proto__: Array.prototype,
1059
+ 0: 1,
1060
+ 1: 2,
1061
+ 2: 3,
1062
+ length: 3,
1063
+ };
1064
+ Object.defineProperty(o, 'length', { enumerable: false });
1065
+ assertNotDeepOrStrict(o, a);
1066
+}
1067
+
1068
// Verify that extra keys will be tested for when using fake arrays.
1069
{
1070
const a = {
0 commit comments