2018-04-13 19:14:03 +05:30

22 lines
423 B
JavaScript

"use strict";
var _obj;
const Hello = {
toString: function () {
return 'hello';
}
};
const Outer = _obj = {
constructor: function () {
const Inner = {
[babelHelpers.get(babelHelpers.getPrototypeOf(_obj), "toString", this).call(this)]: function () {
return 'hello';
}
};
return Inner;
}
};
Object.setPrototypeOf(Outer, Hello);
expect(Outer.constructor().hello()).toBe('hello');