mirror of
https://github.com/swc-project/swc.git
synced 2024-12-18 19:21:33 +03:00
12 lines
269 B
JavaScript
12 lines
269 B
JavaScript
const swc = require("../pkg");
|
|
|
|
it("properly reports error", function () {
|
|
expect(() => {
|
|
swc.transformSync("Foo {}", {});
|
|
}).toThrow("Syntax Error");
|
|
|
|
expect(() => {
|
|
swc.transformSync("Foo {}", {});
|
|
}).toThrow("error: Expected ';', '}' or <eof>");
|
|
});
|