diff --git a/test/parallel/test-assert-deep.js b/test/parallel/test-assert-deep.js index 87f2a5f44f7d64..4f928bf4a08a40 100644 --- a/test/parallel/test-assert-deep.js +++ b/test/parallel/test-assert-deep.js @@ -1050,6 +1050,21 @@ assert.throws( assert.deepStrictEqual(a, b); } +// Verify that an array and the equivalent fake array object +// are correctly compared +{ + const a = [1, 2, 3]; + const o = { + __proto__: Array.prototype, + 0: 1, + 1: 2, + 2: 3, + length: 3, + }; + Object.defineProperty(o, 'length', { enumerable: false }); + assertNotDeepOrStrict(o, a); +} + // Verify that extra keys will be tested for when using fake arrays. { const a = {