swc/node-swc/__tests__/transform/issue846_test.js
강동윤 ff440157a0
Fix regenerator (#851)
swc_ecma_transforms:
 - Fix regenerator scoping issue.
2020-06-18 17:04:49 +09:00

24 lines
395 B
JavaScript

const swc = require('../../../');
it("should handle es2019", () => {
expect(
swc.transformSync(`class SomeClass {
someMethod() {}
}
class OtherClass extends SomeClass {
anotherMethod() {
super.someMethod()
}
}`, {
jsc: {
parser: {
syntax: "ecmascript",
},
target: "es2019",
}
})
.code.trim()
).toContain(`class `);
});