mirror of
https://github.com/swc-project/swc.git
synced 2024-12-18 19:21:33 +03:00
16 lines
416 B
JavaScript
16 lines
416 B
JavaScript
import swc from "../../..";
|
|
|
|
it("should not throw when keep_fnames is on", async () => {
|
|
async function minify() {
|
|
const { code } = await swc.transform('function Foo() {}', {
|
|
jsc: {
|
|
minify: {
|
|
keep_fnames: true,
|
|
},
|
|
},
|
|
});
|
|
return code;
|
|
}
|
|
await expect(minify()).resolves.toEqual('function Foo() {}\n');
|
|
});
|