mirror of
https://github.com/swc-project/swc.git
synced 2024-12-18 19:21:33 +03:00
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 `);
|
||
|
});
|