add regression test - fixes #3028
This commit is contained in:
9
packages/babel-plugin-transform-class-properties/test/fixtures/general/foobar/actual.js
vendored
Normal file
9
packages/babel-plugin-transform-class-properties/test/fixtures/general/foobar/actual.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
class Child extends Parent {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
scopedFunctionWithThis = () => {
|
||||
this.name = {};
|
||||
}
|
||||
}
|
||||
19
packages/babel-plugin-transform-class-properties/test/fixtures/general/foobar/expected.js
vendored
Normal file
19
packages/babel-plugin-transform-class-properties/test/fixtures/general/foobar/expected.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
|
||||
var Child = (function (_Parent) {
|
||||
babelHelpers.inherits(Child, _Parent);
|
||||
|
||||
function Child() {
|
||||
babelHelpers.classCallCheck(this, Child);
|
||||
|
||||
var _this = babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Child).call(this));
|
||||
|
||||
_this.scopedFunctionWithThis = function () {
|
||||
_this.name = {};
|
||||
};
|
||||
|
||||
return _this;
|
||||
}
|
||||
|
||||
return Child;
|
||||
})(Parent);
|
||||
4
packages/babel-plugin-transform-class-properties/test/fixtures/general/foobar/options.json
vendored
Normal file
4
packages/babel-plugin-transform-class-properties/test/fixtures/general/foobar/options.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"plugins": ["external-helpers-2"],
|
||||
"presets": ["stage-0", "es2015"]
|
||||
}
|
||||
Reference in New Issue
Block a user