blob: 5e263427bc28ce6ec311e862d336eaa71d3f0a56 (
plain)
1
2
3
4
5
6
|
test("Declaration in single-statement context is a syntax error", () => {
expect("if (0) const foo = 1").not.toEval();
expect("while (0) function foo() {}").not.toEval();
expect("for (var 0;;) class foo() {}").not.toEval();
expect("do let foo = 1 while (0)").not.toEval();
});
|