packages/babel-plugin-transform-classes/test/fixtures/spec/nested-object-super-call-in-key/exec.js
raw| 1 | "use strict"; |
| 2 | class Hello { |
| 3 | constructor() { |
| 4 | return { |
| 5 | toString() { |
| 6 | return 'hello'; |
| 7 | }, |
| 8 | }; |
| 9 | } |
| 10 | } |
| 11 | |
| 12 | class Outer extends Hello { |
| 13 | constructor() { |
| 14 | const Inner = { |
| 15 | [super()]() { |
| 16 | return 'hello'; |
| 17 | }, |
| 18 | }; |
| 19 | |
| 20 | return Inner; |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | expect(new Outer().hello()).toBe('hello'); |