mirror of
https://github.com/swc-project/swc.git
synced 2024-12-27 15:42:51 +03:00
cb2b0c671f
swc_ecma_transforms_base: - `hygiene`: Don't rename if not required. (#1600) swc_ecma_minifier: - Remove `hygiene_optimizer`.
22 lines
337 B
JavaScript
22 lines
337 B
JavaScript
const swc = require('../../..');
|
|
|
|
|
|
it("should handle es2019", () => {
|
|
expect(
|
|
swc.transformSync(`
|
|
class Foo {
|
|
method() {
|
|
class Foo {
|
|
|
|
}
|
|
}
|
|
}
|
|
`, {
|
|
jsc: {
|
|
keepClassNames: true,
|
|
target: 'es2017',
|
|
}
|
|
})
|
|
.code.trim()
|
|
).toContain(`let Foo = class Foo {`);
|
|
}); |