()
| 27 | const STAGING_DIRNAME = '.staging'; |
| 28 | |
| 29 | async function createTempDir(): Promise<string> { |
| 30 | const baseDir = path.join(process.cwd(), '.test-temp'); |
| 31 | await fs.mkdir(baseDir, { recursive: true }); |
| 32 | const tempDir = path.join(baseDir, `atomic-swap-test-${randomUUID()}`); |
| 33 | await fs.mkdir(tempDir, { recursive: true }); |
| 34 | return tempDir; |
| 35 | } |
| 36 | |
| 37 | async function cleanupDir(dir: string): Promise<void> { |
| 38 | try { |
no outgoing calls
no test coverage detected