(directory: string)
| 104 | }); |
| 105 | |
| 106 | export const cleanup = (directory: string) => { |
| 107 | try { |
| 108 | fs.rmSync(directory, {force: true, recursive: true}); |
| 109 | } catch (error) { |
| 110 | try { |
| 111 | // retry once in case of e.g. permission errors |
| 112 | fs.rmSync(directory, {force: true, recursive: true}); |
| 113 | } catch { |
| 114 | throw error; |
| 115 | } |
| 116 | } |
| 117 | }; |
| 118 | |
| 119 | /** |
| 120 | * Creates a nested directory with files and their contents |
no outgoing calls
no test coverage detected