mirror of
https://github.com/hanzoai/babel.git
synced 2026-10-30 14:46:06 +00:00
26 lines
692 B
JavaScript
26 lines
692 B
JavaScript
"use strict";
|
|
|
|
let Base = /*#__PURE__*/babelHelpers.createClass(function Base() {
|
|
babelHelpers.classCallCheck(this, Base);
|
|
});
|
|
Base.prototype.test = 1;
|
|
let Obj = /*#__PURE__*/function (_Base) {
|
|
babelHelpers.inherits(Obj, _Base);
|
|
var _super = babelHelpers.createSuper(Obj);
|
|
function Obj() {
|
|
babelHelpers.classCallCheck(this, Obj);
|
|
return _super.apply(this, arguments);
|
|
}
|
|
babelHelpers.createClass(Obj, [{
|
|
key: "get",
|
|
value: function get() {
|
|
return babelHelpers.get(babelHelpers.getPrototypeOf(Obj.prototype), "test", this);
|
|
}
|
|
}]);
|
|
return Obj;
|
|
}(Base);
|
|
Obj.prototype.test = 2;
|
|
const obj = new Obj();
|
|
expect(obj.test).toBe(2);
|
|
expect(obj.get()).toBe(1);
|