swc/wasm/__tests__/error.js
Donny/강동윤 e5f46a6800
fix(wasm): Fix bugs (#2279)
swc:
 - Ensure that #2281 is fixed. (#2281)

wasm:
 - Fix `baseUrl` and `paths` support.
 - Apply `hygiene` pass.
2021-09-21 15:24:03 +00:00

12 lines
279 B
JavaScript

const swc = require("../pkg");
it("properly reports error", function () {
expect(() => {
swc.transformSync("Foo {}", {});
}).toThrow("failed to parse module");
expect(() => {
swc.transformSync("Foo {}", {});
}).toThrow("error: Expected ';', '}' or <eof>");
});