mirror of
https://github.com/tc39/test262.git
synced 2025-09-25 11:08:49 +02:00
Fix strict mode violations in sm/Array
This commit is contained in:
parent
e3c64eeb6b
commit
286f73c6e9
@ -3,8 +3,6 @@
|
||||
|
||||
/*---
|
||||
includes: [deepEqual.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
esid: pending
|
||||
@ -90,8 +88,8 @@ Object.defineProperty(Object.prototype, "foo", {
|
||||
Object.groupBy([1, 2, 3], () => 'foo');
|
||||
|
||||
// Ensure property key is correctly accessed
|
||||
count = 0;
|
||||
p = Object.groupBy([1], () => ({ toString() { count++; return 10 } }));
|
||||
let count = 0;
|
||||
const p = Object.groupBy([1], () => ({ toString() { count++; return 10 } }));
|
||||
assert.sameValue(count, 1);
|
||||
Map.groupBy([1], () => ({ toString() { count++; return 10 } }));
|
||||
assert.sameValue(count, 1);
|
||||
|
@ -4,8 +4,6 @@
|
||||
*/
|
||||
|
||||
/*---
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
Array.reduce should ignore holes
|
||||
esid: pending
|
||||
@ -21,6 +19,8 @@ function test()
|
||||
function add(a, b) { return a + b; }
|
||||
function testreduce(v) { return v == 3 ? "PASS" : "FAIL"; }
|
||||
|
||||
var a;
|
||||
|
||||
expect = 'PASS';
|
||||
|
||||
try {
|
||||
|
@ -4,8 +4,6 @@
|
||||
*/
|
||||
|
||||
/*---
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
Array.prototype.toLocaleString
|
||||
esid: pending
|
||||
@ -20,7 +18,7 @@ o = {};
|
||||
assert.sameValue(Array.prototype.toLocaleString.call(o), "");
|
||||
|
||||
var log = '';
|
||||
arr = {length: {valueOf: function () { log += "L"; return 2; }},
|
||||
var arr = {length: {valueOf: function () { log += "L"; return 2; }},
|
||||
0: "x", 1: "z"};
|
||||
assert.sameValue(Array.prototype.toLocaleString.call(arr), "x,z");
|
||||
assert.sameValue(log, "L");
|
||||
|
Loading…
x
Reference in New Issue
Block a user