mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:57: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
|
@ -326,13 +326,11 @@ test("toThrowWithMessage", () => {
|
|||
expect(thrower).not.toThrowWithMessage(TypeError, "foo baz");
|
||||
});
|
||||
|
||||
// FIXME: Will have to change when this matcher changes to use the
|
||||
// "eval" function
|
||||
test("toEval", () => {
|
||||
expect("let a = 1").toEval();
|
||||
expect("a < 1").toEval();
|
||||
expect("&&*^%#%@").not.toEval();
|
||||
expect("function foo() { return 1; }; return foo();").toEval();
|
||||
expect("function foo() { return 1; }; foo();").toEval();
|
||||
});
|
||||
|
||||
// FIXME: Will have to change when this matcher changes to use the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue