(s)
| 11 | } |
| 12 | |
| 13 | function wrapInEagerFunction(s) { |
| 14 | // Use an async function, since some tests use the await keyword. Await the |
| 15 | // result, so that we get the error right away. |
| 16 | return "await (async function test() { " + s + "})();"; |
| 17 | } |
| 18 | |
| 19 | function assertEarlyError(s) { |
| 20 | assertThrows(wrapInLazyFunction(s), SyntaxError); |