mirror of
https://github.com/swc-project/swc.git
synced 2024-12-26 07:02:28 +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>");
|
|
});
|