(fromFile: string)
| 5198 | } |
| 5199 | |
| 5200 | function importedFilePaths(fromFile: string): string[] { |
| 5201 | const source = fileNode(fromFile); |
| 5202 | expect(source, `${fromFile} file node`).toBeDefined(); |
| 5203 | return cg |
| 5204 | .getOutgoingEdges(source!.id) |
| 5205 | .filter((edge) => edge.kind === 'imports') |
| 5206 | .map((edge) => cg.getNodesByKind('file').find((n) => n.id === edge.target)?.filePath) |
| 5207 | .filter((filePath): filePath is string => Boolean(filePath)) |
| 5208 | .sort(); |
| 5209 | } |
| 5210 | |
| 5211 | it('resolves relative Nix imports to indexed file nodes', async () => { |
| 5212 | fs.mkdirSync(path.join(tempDir, 'core'), { recursive: true }); |
no test coverage detected