(name: string)
| 790 | // the `await`, which the call node starts at. |
| 791 | const lines = code.split('\n'); |
| 792 | const columnOf = (name: string) => { |
| 793 | const fn = result.nodes.find((n) => n.name === name)!; |
| 794 | return calls.find((c) => c.fromNodeId === fn.id)!.column; |
| 795 | }; |
| 796 | expect(columnOf('awaited')).toBe(lines[0]!.indexOf('fetchApi')); |
| 797 | expect(columnOf('viaNamespace')).toBe(lines[2]!.indexOf('api.fetchApi')); |
| 798 | }); |