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

Function cleanupTmpFile

test/parallel/test-repl-programmatic-history.js:168–177  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

166
167
168function cleanupTmpFile() {
169 try {
170 // Write over the file, clearing any history
171 fs.writeFileSync(defaultHistoryPath, '');
172 } catch (err) {
173 if (err.code === 'ENOENT') return true;
174 throw err;
175 }
176 return true;
177}
178
179// Copy our fixture to the tmp directory
180fs.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…