1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:28:13 +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

@ -20,7 +20,6 @@ test("basic functionality", () => {
expect(new baz().newTarget).toEqual(baz);
});
// FIXME: This does not work as expected as toEval() places the code inside a function :|
test.skip("syntax error outside of function", () => {
test("syntax error outside of function", () => {
expect("new.target").not.toEval();
});