add missing compareArray function

This commit is contained in:
Michael Ficarra 2018-01-05 11:52:43 -08:00 committed by Rick Waldron
parent 6bd7b21a2b
commit d8233624aa
1 changed files with 5 additions and 4 deletions

View File

@ -4,11 +4,12 @@
esid: sec-array.prototype.flatten
description: >
arrays with empty object elements
includes: [compareArray.js]
---*/
var a = {}, b = {};
assert.compareArrays([a].flatten(), [a]);
assert.compareArrays([a, [b]].flatten(), [a, b]);
assert.compareArrays([[a], b].flatten(), [a, b]);
assert.compareArrays([[a], [b]].flatten(), [a, b]);
assert.compareArray([a].flatten(), [a]);
assert.compareArray([a, [b]].flatten(), [a, b]);
assert.compareArray([[a], b].flatten(), [a, b]);
assert.compareArray([[a], [b]].flatten(), [a, b]);