swc/node-swc/__tests__/env/env_test.js
강동윤 3a372ad29a
Move node-swc into the repository (#789)
The commit will help

 - Better testing
 - Preventing regression like #785.
 - **Implementing spack** (It requires access to neon api because of the plugin system)
2020-05-22 20:36:39 +09:00

21 lines
546 B
JavaScript

const swc = require("../../../");
const path = require("path");
// it("should handle browserslistrc", () => {
// const filename = path.resolve(
// __dirname + "/../../tests/env/default/input.js"
// );
// expect(swc.transformFileSync(filename).code.trim()).toContain(
// `const a of foo`
// );
// });
it("should handle targets in env", () => {
const filename = path.resolve(
__dirname + "/../../tests/env/targets/input.js"
);
expect(swc.transformFileSync(filename).code.trim()).toContain(
`const a of foo`
);
});