mirror of
https://github.com/swc-project/swc.git
synced 2024-12-25 22:56:11 +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>");
|
|
});
|