(config: Config, workspaceId: string)
| 16686 | }, 20_000); |
| 16687 | |
| 16688 | async function removeWorkspaceFromTestConfig(config: Config, workspaceId: string): Promise<void> { |
| 16689 | const cfg = config.loadConfigOrDefault(); |
| 16690 | let removed = false; |
| 16691 | |
| 16692 | for (const project of cfg.projects.values()) { |
| 16693 | const nextWorkspaces = project.workspaces.filter((workspace) => workspace.id !== workspaceId); |
| 16694 | if (nextWorkspaces.length === project.workspaces.length) { |
| 16695 | continue; |
| 16696 | } |
| 16697 | |
| 16698 | project.workspaces = nextWorkspaces; |
| 16699 | removed = true; |
| 16700 | } |
| 16701 | |
| 16702 | assert(removed, `Expected workspace ${workspaceId} to exist in test config`); |
| 16703 | await config.saveConfig(cfg); |
| 16704 | } |
| 16705 | |
| 16706 | test("reported leaf cleanup deletes the finished leaf but keeps siblings and parents", async () => { |
| 16707 | const config = await createTestConfig(rootDir); |
no test coverage detected