(base: string, children: string[])
| 845 | it('neither adopts nor lists the indexed sub-projects of a sensitive folder', async () => { |
| 846 | /** A workspace (it has a .git) whose indexes live in its sub-folders. */ |
| 847 | const workspace = async (base: string, children: string[]): Promise<string> => { |
| 848 | fs.mkdirSync(path.join(base, '.git'), { recursive: true }); |
| 849 | for (const child of children) { |
| 850 | fs.mkdirSync(path.join(base, child)); |
| 851 | fs.writeFileSync(path.join(base, child, 'a.ts'), 'export const a = 1;\n'); |
| 852 | (await CodeGraph.init(path.join(base, child))).close(); |
| 853 | } |
| 854 | return base; |
| 855 | }; |
| 856 | // Nothing indexed at or above these, so the down-scan below them decides. |
| 857 | const one = await workspace(path.join(state.home, '.aws', 'one'), ['only']); |
| 858 | const two = await workspace(path.join(state.home, '.aws', 'two'), ['a', 'b']); |
no test coverage detected