fix corner cases with instanceof (#5509)

- enhance `evaluate`
This commit is contained in:
Alex Lam S.L
2022-06-12 03:01:54 +01:00
committed by GitHub
parent 99946a3993
commit 139fad0c05
10 changed files with 167 additions and 25 deletions

View File

@@ -50,6 +50,22 @@ regexp_properties: {
expect_stdout: "abc true false 0 false"
}
instanceof_1: {
input: {
console.log(/foo/ instanceof RegExp);
}
expect_exact: "console.log(/foo/ instanceof RegExp);"
expect_stdout: "true"
}
instanceof_2: {
input: {
console.log(42 + /foo/ instanceof Object);
}
expect_exact: "console.log(42+/foo/ instanceof Object);"
expect_stdout: "false"
}
issue_3434_1: {
options = {
evaluate: true,