(fromFile: string)
| 4790 | } |
| 4791 | |
| 4792 | function importedFilePaths(fromFile: string): string[] { |
| 4793 | const source = fileNode(fromFile); |
| 4794 | expect(source, `${fromFile} file node`).toBeDefined(); |
| 4795 | return cg |
| 4796 | .getOutgoingEdges(source!.id) |
| 4797 | .filter((edge) => edge.kind === 'imports') |
| 4798 | .map((edge) => cg.getNodesByKind('file').find((n) => n.id === edge.target)?.filePath) |
| 4799 | .filter((filePath): filePath is string => Boolean(filePath)) |
| 4800 | .sort(); |
| 4801 | } |
| 4802 | |
| 4803 | it('resolves relative Nix imports to indexed file nodes', async () => { |
| 4804 | fs.mkdirSync(path.join(tempDir, 'core'), { recursive: true }); |
no test coverage detected