(fromFile: string)
| 6065 | } |
| 6066 | |
| 6067 | function importedFilePaths(fromFile: string): string[] { |
| 6068 | const source = fileNode(fromFile); |
| 6069 | expect(source, `${fromFile} file node`).toBeDefined(); |
| 6070 | return cg |
| 6071 | .getOutgoingEdges(source!.id) |
| 6072 | .filter((edge) => edge.kind === 'imports') |
| 6073 | .map((edge) => cg.getNodesByKind('file').find((n) => n.id === edge.target)?.filePath) |
| 6074 | .filter((filePath): filePath is string => Boolean(filePath)) |
| 6075 | .sort(); |
| 6076 | } |
| 6077 | |
| 6078 | it('resolves relative Nix imports to indexed file nodes', async () => { |
| 6079 | fs.mkdirSync(path.join(tempDir, 'core'), { recursive: true }); |
no test coverage detected