mirror of
https://github.com/swc-project/swc.git
synced 2024-12-19 19:52:21 +03:00
12 lines
303 B
JavaScript
12 lines
303 B
JavaScript
|
const swc = require("../pkg");
|
||
|
|
||
|
it("properly reports error", function () {
|
||
|
expect(() => {
|
||
|
swc.transformSync("Foo {}", {});
|
||
|
}).toThrow("failed to process code: failed to parse module");
|
||
|
|
||
|
expect(() => {
|
||
|
swc.transformSync("Foo {}", {});
|
||
|
}).toThrow("error: Expected ';', '}' or <eof>");
|
||
|
});
|