(dir: string)
| 77 | } |
| 78 | |
| 79 | async function removeTempDir(dir: string): Promise<void> { |
| 80 | for (let attempt = 0; attempt < 10; attempt += 1) { |
| 81 | try { |
| 82 | await rm(dir, { recursive: true, force: true }); |
| 83 | return; |
| 84 | } catch (error) { |
| 85 | const code = (error as NodeJS.ErrnoException).code; |
| 86 | if (code !== 'ENOTEMPTY' && code !== 'EBUSY' && code !== 'EPERM') { |
| 87 | throw error; |
| 88 | } |
| 89 | await delay(10); |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | await rm(dir, { recursive: true, force: true }); |
| 94 | } |
| 95 | |
| 96 | describe('Session.prompt events', () => { |
| 97 | it('persists sanitized prompt metadata without marking the title custom', async () => { |
no test coverage detected