Nicolò Ribaudo ea6a438315
Enable external-helpers by default in tests (#12911)
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
Co-authored-by: Babel Bot <babel-bot@users.noreply.github.com>
2021-02-26 23:33:26 +01:00

49 lines
1.2 KiB
JavaScript

var Point = /*#__PURE__*/function () {
"use strict";
function Point() {
babelHelpers.classCallCheck(this, Point);
}
babelHelpers.createClass(Point, [{
key: "getX",
value: function getX() {
expect(this.x).toBe(3); // C
}
}]);
return Point;
}();
var ColorPoint = /*#__PURE__*/function (_Point) {
"use strict";
babelHelpers.inherits(ColorPoint, _Point);
var _super = babelHelpers.createSuper(ColorPoint);
function ColorPoint() {
var _thisSuper, _thisSuper2, _this;
babelHelpers.classCallCheck(this, ColorPoint);
_this = _super.call(this);
_this.x = 2;
babelHelpers.set((_thisSuper = babelHelpers.assertThisInitialized(_this), babelHelpers.getPrototypeOf(ColorPoint.prototype)), "x", 3, _thisSuper, true);
expect(_this.x).toBe(3); // A
expect(babelHelpers.get((_thisSuper2 = babelHelpers.assertThisInitialized(_this), babelHelpers.getPrototypeOf(ColorPoint.prototype)), "x", _thisSuper2)).toBeUndefined(); // B
return _this;
}
babelHelpers.createClass(ColorPoint, [{
key: "m",
value: function m() {
this.getX();
}
}]);
return ColorPoint;
}(Point);
var cp = new ColorPoint();
cp.m();