mirror of
https://github.com/swc-project/swc.git
synced 2024-12-26 07:02:28 +03:00
ff440157a0
swc_ecma_transforms: - Fix regenerator scoping issue.
24 lines
395 B
JavaScript
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 `);
|
|
}); |