Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function reset (testDir) {
cacache.clearMemoized()
process.chdir(__dirname)
return BB.fromNode(cb => {
rimraf(testDir, function (err) {
if (err) { return cb(err) }
mkdirp(testDir, function (err) {
if (err) { return cb(err) }
process.chdir(testDir)
cb()
})
})
})
}
function _cachedFetchLoop (n) {
cacache.clearMemoized()
return niceFetch(URL, {
cacheManager: CACHE
}).then(res => res.json()).then(res => {
if (n > 0) {
return _cachedFetchLoop(n - 1)
}
})
}