Skip to content

Commit

Permalink
test: swc allows invalid js syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-ippolito committed Jan 27, 2025
1 parent 990b838 commit 612d263
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,7 @@ test("should not throw on yield new line when stripped", (t) => {
const result = vm.runInContext(code, vm.createContext());
assert.strictEqual(result, 5);
});

test("should throw invalid syntax error", (t) => {
assert.throws(() => transformSync("const foo;"));
});

0 comments on commit 612d263

Please sign in to comment.