packages/babel-plugin-proposal-decorators/test/fixtures/2018-09-ordering/static-field-initializers-after-methods/exec.js
raw symbols SCIP| 1 | var counter = 0; |
| 2 | |
| 3 | @(x => x) |
| 4 | class A { |
| 5 | static foo = (() => { |
| 6 | counter++; |
| 7 | expect(typeof this.method).toBe("function"); |
| 8 | expect(this.foo).toBeUndefined(); |
| 9 | expect(this.bar).toBeUndefined(); |
| 10 | return "foo"; |
| 11 | })(); |
| 12 | |
| 13 | static method() {} |
| 14 | |
| 15 | static bar = (() => { |
| 16 | counter++; |
| 17 | expect(typeof this.method).toBe("function"); |
| 18 | expect(this.foo).toBe("foo"); |
| 19 | expect(this.bar).toBeUndefined(); |
| 20 | })(); |
| 21 | } |
| 22 | |
| 23 | expect(counter).toBe(2); |