Debian Codegraph @

packages/babel-plugin-transform-arrow-functions/test/fixtures/arrow-functions/self-referential/input.js

raw
1 var fooCalls = []
2 var jumpTable = (name, arg) => { if (jumpTable[name]) { jumpTable[name](arg) } }
3 Object.assign(jumpTable, { foo (arg) { fooCalls.push(arg) } });
4 jumpTable('foo', 'bar')
5
6 expect(fooCalls[0]).toBe('bar');