packages/babel-plugin-proposal-decorators/test/fixtures/2018-09-duplicated-keys/extras-duplicated/exec.js
raw symbols SCIP| 1 | function decorate(el) { |
| 2 | el.extras = [{ |
| 3 | kind: "method", |
| 4 | key: "foo", |
| 5 | descriptor: { |
| 6 | enumerable: true, |
| 7 | configurable: true, |
| 8 | writable: true, |
| 9 | value: function() {}, |
| 10 | } |
| 11 | }, { |
| 12 | kind: "method", |
| 13 | key: "foo", |
| 14 | descriptor: { |
| 15 | enumerable: true, |
| 16 | configurable: true, |
| 17 | writable: true, |
| 18 | value: function() {}, |
| 19 | } |
| 20 | }]; |
| 21 | |
| 22 | return el; |
| 23 | } |
| 24 | |
| 25 | expect(() => { |
| 26 | class A { |
| 27 | @decorate |
| 28 | method() {} |
| 29 | } |
| 30 | }).toThrow(TypeError); |
| 31 | |
| 32 |