workaround toString() quirks on global context (#4814)

This commit is contained in:
Alex Lam S.L
2021-03-23 03:15:41 +00:00
committed by GitHub
parent f9055df44d
commit 44394e61c9
4 changed files with 16 additions and 19 deletions

View File

@@ -176,13 +176,13 @@ issue_4054: {
issue_4811_1: {
input: {
for (var PASS in this);
console.log(PASS, this);
console.log(PASS, this, {} < this);
}
expect: {
for (var PASS in this);
console.log(PASS, this);
console.log(PASS, this, {} < this);
}
expect_stdout: "PASS [object global]"
expect_stdout: "PASS [object global] true"
}
issue_4811_2: {
@@ -192,12 +192,12 @@ issue_4811_2: {
input: {
(async function() {});
for (var PASS in this);
console.log(PASS, this);
console.log(PASS, this, {} < this);
}
expect: {
for (var PASS in this);
console.log(PASS, this);
console.log(PASS, this, {} < this);
}
expect_stdout: "PASS [object global]"
expect_stdout: "PASS [object global] true"
node_version: ">=8"
}