(tempDirs: string[], prefix: string)
| 17 | } |
| 18 | |
| 19 | export async function makeTempDir(tempDirs: string[], prefix: string): Promise<string> { |
| 20 | const dir = await mkdtemp(join(tmpdir(), prefix)); |
| 21 | tempDirs.push(dir); |
| 22 | return dir; |
| 23 | } |
| 24 | |
| 25 | export async function removeTempDirs(tempDirs: string[]): Promise<void> { |
| 26 | for (const dir of tempDirs.splice(0)) { |
no test coverage detected