fix corner case in booleans (#4246)

fixes #4245
This commit is contained in:
Alex Lam S.L
2020-10-26 10:53:58 +00:00
committed by GitHub
parent b2775746a7
commit 607f87c5cd
4 changed files with 47 additions and 2 deletions

View File

@@ -386,7 +386,7 @@ function test_case(test) {
mangle: test.mangle
});
var actual = stdout[toplevel ? 1 : 0];
if (test.expect_stdout === true) {
if (test.expect_stdout === true || test.expect_stdout instanceof Error && test.expect_stdout.name === actual.name) {
test.expect_stdout = actual;
}
if (!sandbox.same_stdout(test.expect_stdout, actual)) {