mirror of
https://github.com/swc-project/swc.git
synced 2024-12-25 06:36:08 +03:00
2ca6e5d79b
swc_ecma_transforms_optimization: - `inline_globals`: Support inlining of `typeof`s. swc: - Change error message for parsing failure to mention `Syntax Error`.
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>");
|
|
});
|