diff options
author | Michael Ficarra <git@michael.ficarra.me> | 2018-01-05 08:50:35 -0800 |
---|---|---|
committer | Rick Waldron <waldron.rick@gmail.com> | 2018-01-05 16:59:34 -0500 |
commit | 02ceb624009d21e34355130b36a1350df75ea4cd (patch) | |
tree | e0b0cf3d7dd23cea55a4f954f9ac263b8abd3e91 /test/built-ins/Array/prototype/flatten/empty-array-elements.js | |
parent | 1547e49c9510e06d361cbb94d6df73063d7e124f (diff) | |
download | qtdeclarative-testsuites-02ceb624009d21e34355130b36a1350df75ea4cd.tar.gz |
flatMap/flatten test improvements
Diffstat (limited to 'test/built-ins/Array/prototype/flatten/empty-array-elements.js')
-rw-r--r-- | test/built-ins/Array/prototype/flatten/empty-array-elements.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/built-ins/Array/prototype/flatten/empty-array-elements.js b/test/built-ins/Array/prototype/flatten/empty-array-elements.js index ebcf78586..9fa2b782b 100644 --- a/test/built-ins/Array/prototype/flatten/empty-array-elements.js +++ b/test/built-ins/Array/prototype/flatten/empty-array-elements.js @@ -7,9 +7,8 @@ description: > includes: [compareArray.js] ---*/ -var a; -assert(compareArray([].flatten([[]]), [])); -assert(compareArray(Array.prototype.flatten.call([[], []]), [])); -assert(compareArray(Array.prototype.flatten.call([[], [1]]), [1])); -assert(compareArray(Array.prototype.flatten.call([[], [1, a = []]]), [1, a])); -assert.sameValue(JSON.stringify(Array.prototype.flatten.call([{}, []])), JSON.stringify([{}])); +var a = {}; +assert.compareArray([].flatten(), []); +assert.compareArray([[], []].flatten(), []); +assert.compareArray([[], [1]].flatten(), [1]); +assert.compareArray([[], [1, a]].flatten(), [1, a]); |