()
| 175 | |
| 176 | |
| 177 | function cleanupTmpFile() { |
| 178 | try { |
| 179 | // Write over the file, clearing any history |
| 180 | fs.writeFileSync(defaultHistoryPath, ''); |
| 181 | } catch (err) { |
| 182 | if (err.code === 'ENOENT') return true; |
| 183 | throw err; |
| 184 | } |
| 185 | return true; |
| 186 | } |
| 187 | |
| 188 | // Copy our fixture to the tmp directory |
| 189 | fs.createReadStream(historyFixturePath) |
no test coverage detected