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:
parent
7fc98a96a9
commit
e77202fe0f
4 changed files with 10 additions and 19 deletions
|
@ -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();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue