mirror of https://github.com/tc39/test262.git
assert.compareArray does not perform deep-equality comparison
This commit is contained in:
parent
8b50602099
commit
658f19005b
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue