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