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