MCPcopy Index your code
hub / github.com/nodejs/node / cleanupTmpFile

Function cleanupTmpFile

test/parallel/test-repl-persistent-history.js:174–183  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

runTestFunction · 0.70

Calls 1

writeFileSyncMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…