packages/babel-plugin-transform-classes/test/fixtures/regression/8499/exec.js
raw| 1 | // Pretend that `Reflect.construct` isn't supported. |
| 2 | global.Reflect = undefined; |
| 3 | |
| 4 | global.HTMLElement = function() { |
| 5 | // Here, `this.HTMLElement` is this function, not the original HTMLElement |
| 6 | // constructor. `this.constructor` should be this function too, but isn't. |
| 7 | constructor = this.constructor; |
| 8 | }; |
| 9 | |
| 10 | var constructor; |
| 11 | |
| 12 | class CustomElement extends HTMLElement {} |
| 13 | new CustomElement(); |
| 14 | |
| 15 | expect(constructor).toBe(CustomElement); |