diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/2021-12-misc/initProto-existing-derived-constructor/exec.js b/packages/babel-plugin-proposal-decorators/test/fixtures/2021-12-misc--to-es2015/initProto-existing-derived-constructor/exec.js similarity index 100% rename from packages/babel-plugin-proposal-decorators/test/fixtures/2021-12-misc/initProto-existing-derived-constructor/exec.js rename to packages/babel-plugin-proposal-decorators/test/fixtures/2021-12-misc--to-es2015/initProto-existing-derived-constructor/exec.js diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/2021-12-misc--to-es2015/initProto-existing-derived-constructor/input.js b/packages/babel-plugin-proposal-decorators/test/fixtures/2021-12-misc--to-es2015/initProto-existing-derived-constructor/input.js new file mode 100644 index 0000000000..d72d66fd2a --- /dev/null +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/2021-12-misc--to-es2015/initProto-existing-derived-constructor/input.js @@ -0,0 +1,10 @@ +class A extends B { + constructor() { + let a = 2; + super(a); + foo(); + } + + @deco + method() {} +} diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/2021-12-misc--to-es2015/initProto-existing-derived-constructor/output.js b/packages/babel-plugin-proposal-decorators/test/fixtures/2021-12-misc--to-es2015/initProto-existing-derived-constructor/output.js new file mode 100644 index 0000000000..61a1fde840 --- /dev/null +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/2021-12-misc--to-es2015/initProto-existing-derived-constructor/output.js @@ -0,0 +1,18 @@ +var _initProto; + +class A extends B { + constructor() { + let a = 2; + + _initProto(super(a)); + + foo(); + } + + method() {} + +} + +(() => { + [_initProto] = babelHelpers.applyDecs(A, [[deco, 2, "method"]], []); +})();