fix corner case in typeofs (#3818)

fixes #3817
This commit is contained in:
Alex Lam S.L
2020-04-24 18:29:42 +01:00
committed by GitHub
parent 3ee13cae02
commit 3a4497a1c3
2 changed files with 46 additions and 9 deletions

View File

@@ -435,3 +435,25 @@ emberjs_global: {
}
expect_stdout: Error("PASS")
}
issue_3817: {
options = {
comparisons: true,
conditionals: true,
passes: 2,
typeofs: true,
}
input: {
if ("A" == typeof A || !console.log("PASS")) switch (false) {
case "undefined" == typeof A:
console.log("FAIL");
}
}
expect: {
if ("A" == typeof A || !console.log("PASS")) switch (false) {
case "undefined" == typeof A:
console.log("FAIL");
}
}
expect_stdout: "PASS"
}