From 658f19005b3ab19e3955ac600accb9468559da4f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Bargull?= <andre.bargull@gmail.com>
Date: Wed, 17 Jan 2018 10:39:17 -0800
Subject: [PATCH] assert.compareArray does not perform deep-equality comparison

---
 .../built-ins/Array/prototype/flatMap/depth-always-one.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/test/built-ins/Array/prototype/flatMap/depth-always-one.js b/test/built-ins/Array/prototype/flatMap/depth-always-one.js
index a31e0a1a56..83b7b5f729 100644
--- a/test/built-ins/Array/prototype/flatMap/depth-always-one.js
+++ b/test/built-ins/Array/prototype/flatMap/depth-always-one.js
@@ -12,6 +12,10 @@ assert.compareArray([1, 2].flatMap(function(e) {
   return [e, e * 2];
 }), [1, 2, 2, 4], 'array depth is 1');
 
-assert.compareArray([1, 2, 3].flatMap(function(ele) {
+var result = [1, 2, 3].flatMap(function(ele) {
   return [[ele * 2]];
-}), [[2], [4], [6]], 'array depth is more than 1');
+};
+assert.sameValue(result.length, 3, 'array depth is more than 1 - length');
+assert.compareArray(result[0], [2], 'array depth is more than 1 - 1st element');
+assert.compareArray(result[1], [4], 'array depth is more than 1 - 2nd element');
+assert.compareArray(result[2], [6], 'array depth is more than 1 - 3rd element');
-- 
GitLab