mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
LibJS/Tests: Use eval() for toEvalTo(), not Function()
Since we have had eval() for a while now, we can finally use it here - this allows us to get rid of the confusing return statements in tested source code.
This commit is contained in:
parent
2e9f665bda
commit
299c3069c1
5 changed files with 8 additions and 10 deletions
|
@ -7,7 +7,7 @@ var i = 0;
|
|||
i++;
|
||||
*/
|
||||
/**/ i++;
|
||||
return i;`;
|
||||
i;`;
|
||||
|
||||
expect(source).toEvalTo(1);
|
||||
});
|
||||
|
@ -22,7 +22,7 @@ i++;
|
|||
--> i++;
|
||||
/**/ --> i++;
|
||||
j --> i++;
|
||||
return i;`;
|
||||
i;`;
|
||||
expect(source).toEvalTo(2);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue