1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:27:35 +00:00

LibJS/Tests: Use canParseSource() for toEval()

We can now enable the "new.target is syntax error outside of function"
test :^)
This commit is contained in:
Linus Groh 2020-11-11 22:16:37 +00:00 committed by Andreas Kling
parent 7fc98a96a9
commit e77202fe0f
4 changed files with 10 additions and 19 deletions

View file

@ -1,18 +1,18 @@
test("Issue #1829, if-else without braces or semicolons", () => {
const source = `if (1)
return 1;
foo;
else
return 0;
bar;
if (1)
return 1
foo
else
return 0
bar
if (1)
return 1
foo
else
return 0;`;
bar;`;
expect(source).toEval();
});