packages/babel-plugin-transform-arrow-functions/test/fixtures/assumption-newableArrowFunctions-false/self-referential/output.js
raw| 1 | var _this = this; |
| 2 | var fooCalls = []; |
| 3 | var _jumpTable = function jumpTable(name, arg) { |
| 4 | babelHelpers.newArrowCheck(this, _this); |
| 5 | if (_jumpTable[name]) { |
| 6 | _jumpTable[name](arg); |
| 7 | } |
| 8 | }.bind(this); |
| 9 | Object.assign(_jumpTable, { |
| 10 | foo(arg) { |
| 11 | fooCalls.push(arg); |
| 12 | } |
| 13 | }); |
| 14 | _jumpTable('foo', 'bar'); |
| 15 | expect(fooCalls[0]).toBe('bar'); |