Remove 'use strict' directive from onlyStrict tests

This commit is contained in:
André Bargull 2025-04-30 14:16:19 +02:00 committed by Philip Chimento
parent 7b1eabb793
commit 1cd8f45b27
13 changed files with 3 additions and 19 deletions

View File

@ -8,7 +8,6 @@ description: |
pending
esid: pending
---*/
"use strict";
Object.defineProperty(String.prototype, "toLocaleString", {
get() {
@ -19,4 +18,3 @@ Object.defineProperty(String.prototype, "toLocaleString", {
})
assert.sameValue(["test"].toLocaleString(), "string");

View File

@ -8,7 +8,8 @@ description: |
pending
esid: pending
---*/
"use strict"; // Use strict-mode to ensure |this| arguments aren't converted to objects.
// strict-mode to ensure |this| arguments aren't converted to objects.
var emptyIterator = {
next() {
@ -30,4 +31,3 @@ Object.defineProperty(Number.prototype, Symbol.iterator, {
Promise.all(0);
Promise.allSettled(0);
Promise.race(0);

View File

@ -8,7 +8,6 @@ description: |
pending
esid: pending
---*/
"use strict";
var y = new Proxy({}, {
getOwnPropertyDescriptor(target, key) {
@ -28,4 +27,3 @@ var y = new Proxy({}, {
// This will invoke [[Set]] on the target, with the proxy as receiver.
assert.throws(TypeError, () => y.a = 1);
assert.throws(TypeError, () => y.b = 2);

View File

@ -8,7 +8,6 @@ description: |
pending
esid: pending
---*/
"use strict";
// Seal
assert.sameValue(Object.isSealed(new Int32Array(2)), false);
@ -54,4 +53,3 @@ array = new Int32Array(1);
assert.throws(TypeError, () => Object.freeze(array));
assert.sameValue(Object.isExtensible(array), false);
assert.sameValue(Object.isFrozen(array), false);

View File

@ -10,7 +10,6 @@ description: |
eval in all its myriad flavors
esid: pending
---*/
"use strict";
var x = 17;

View File

@ -10,7 +10,6 @@ description: |
eval in all its myriad flavors
esid: pending
---*/
"use strict";
var x = 17;

View File

@ -10,7 +10,6 @@ description: |
eval in all its myriad flavors
esid: pending
---*/
"use strict";
var x = 17;

View File

@ -10,7 +10,6 @@ description: |
eval in all its myriad flavors
esid: pending
---*/
"use strict";
var x = 17;

View File

@ -10,7 +10,6 @@ description: |
Verify that we don't optimize free names to gnames in eval code that's global, when the name refers to a binding introduced by a strict mode eval frame
esid: pending
---*/
"use strict";
var x = "global";
assert.sameValue(eval('var x = "eval"; eval("x")'), "eval");

View File

@ -10,7 +10,6 @@ description: |
|delete window.NaN| should throw a TypeError
esid: pending
---*/
"use strict"
var g = this, v = false;
try

View File

@ -8,7 +8,6 @@ description: |
pending
esid: pending
---*/
"use strict"
var log = "";

View File

@ -8,7 +8,6 @@ description: |
pending
esid: pending
---*/
"use strict";
Object.defineProperty(String.prototype, "toString", {
get() {
@ -18,4 +17,3 @@ Object.defineProperty(String.prototype, "toString", {
}
})
assert.sameValue(Object.prototype.toLocaleString.call("test"), "string");

View File

@ -10,9 +10,8 @@ description: |
pending
esid: pending
---*/
"use strict";
assert.throws(
SyntaxError,
() => eval("(function() { eval(); function eval() {} })")
)