* Runs `refs` through the check for a call written on `window.App…`, which * looks up the object the receiver it read back names.
(source: string, refs: UnresolvedRef[])
| 115 | * looks up the object the receiver it read back names. |
| 116 | */ |
| 117 | function readBack(source: string, refs: UnresolvedRef[]): { holders: string[]; joined: number } { |
| 118 | const lines = source.split('\n'); |
| 119 | const holders: string[] = []; |
| 120 | const context: ResolutionContext = { |
| 121 | getNodesInFile: () => [], |
| 122 | getNodesByName: (name) => { |
| 123 | holders.push(name); |
| 124 | return []; |
| 125 | }, |
| 126 | getNodesByQualifiedName: () => [], |
| 127 | getNodesByKind: () => [], |
| 128 | getNodesByLowerName: () => [], |
| 129 | fileExists: () => false, |
| 130 | readFile: () => source, |
| 131 | getFileLines: () => lines, |
| 132 | getProjectRoot: () => '', |
| 133 | getAllFiles: () => [], |
| 134 | getImportMappings: () => [], |
| 135 | }; |
| 136 | const joined = joinedDuring(() => { |
| 137 | for (const ref of refs) matchCollapsedObjectCall(ref, context); |
| 138 | }); |
| 139 | return { holders, joined }; |
| 140 | } |
| 141 | |
| 142 | const call = (name: string, line: number, column: number): UnresolvedRef => ({ |
| 143 | fromNodeId: 'bundle', referenceName: name, referenceKind: 'calls', line, column, |
no test coverage detected