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