(prefix: string)
| 48 | } |
| 49 | |
| 50 | function shortTestDir(prefix: string): string { |
| 51 | const id = `${process.pid}-${Math.random().toString(16).slice(2)}` |
| 52 | if (process.platform === 'darwin') { |
| 53 | return join('/tmp', `${prefix}-${id}`) |
| 54 | } |
| 55 | return join(tmpdir(), `${prefix}-${id}`) |
| 56 | } |
| 57 | |
| 58 | function sleep(ms: number): Promise<void> { |
| 59 | return new Promise(resolve => setTimeout(resolve, ms)) |
no test coverage detected