packages/babel-plugin-transform-classes/test/fixtures/get-set/call-semantics-setter-defined-on-parent/exec.js
raw| 1 | "use strict"; |
| 2 | class Base { |
| 3 | set test(v) { |
| 4 | throw new Error("gobbledygook"); |
| 5 | } |
| 6 | } |
| 7 | |
| 8 | class Obj extends Base { |
| 9 | call() { |
| 10 | return super.test(); |
| 11 | } |
| 12 | |
| 13 | test() { |
| 14 | throw new Error("gobbledygook"); |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | const obj = new Obj(); |
| 19 | expect(() => { |
| 20 | obj.call(); |
| 21 | |
| 22 | // Assert that this throws, but that it's not |
| 23 | // a gobbledygook error that is thrown |
| 24 | }).toThrow(TypeError) |