packages/babel-plugin-transform-object-super/test/fixtures/object-super/nested-class-super-property-in-key/output.js
raw| 1 | "use strict"; |
| 2 | |
| 3 | var _obj; |
| 4 | const Hello = { |
| 5 | toString: function () { |
| 6 | return 'hello'; |
| 7 | } |
| 8 | }; |
| 9 | const Outer = _obj = { |
| 10 | constructor: function () { |
| 11 | class Inner { |
| 12 | [babelHelpers.get(babelHelpers.getPrototypeOf(_obj), "toString", this).call(this)]() { |
| 13 | return 'hello'; |
| 14 | } |
| 15 | } |
| 16 | return new Inner(); |
| 17 | } |
| 18 | }; |
| 19 | Object.setPrototypeOf(Outer, Hello); |
| 20 | expect(Outer.constructor().hello()).toBe('hello'); |