rimraf.sync(tempdir) })
const clearDir = (dir) => { if (fs.existsSync(dir)) rimraf.sync(dir); fs.mkdirSync(dir, { recursive: true }); }
spawn.sync('npm', ['install'], { cwd: `${projectName}`, stdio: 'inherit' }); spawn.sync('npm', ['install'], { cwd: `${projectName}/api`, stdio: 'inherit', }); spawn.sync('npm', ['install'], { cwd: `${projectName}/frontend`, stdio: 'inherit', }); } else { spawn.sync('yarn', { cwd: `${projectName}`, stdio: 'inherit' }); rimraf.sync(`${projectName}/.git`); rimraf.sync(`${projectName}/lib`); rimraf.sync(`${projectName}/LICENSE.md`); rimraf.sync(`${projectName}/CONTRIBUTING.md`); rimraf.sync(`${projectName}/.prettierrc`); rimraf.sync(`${projectName}/.github`); rimraf.sync(`${projectName}/CODE_OF_CONDUCT.md`);
afterEach(async () => { const homedir = os.homedir() const clientWalletPath = `${homedir}/.indy_client/wallet/${clientWalletName}` await rimraf.sync(clientWalletPath) })
beforeEach(() => { if (db) { db.close() } let dbPath = path.join(__dirname, 'db') rimraf.sync(dbPath) db = level(dbPath) data = db.sublevel('data') size = 1000 queue = new Qool(db) })
test('zipSync', function (t) { var tmpFileZipPath = path.join(tmpPath, 'file.zip') zip.zipSync(filePath, tmpFileZipPath) var tmpFilePath = path.join(tmpPath, 'file.txt') rimraf.sync(tmpFilePath) zip.unzipSync(tmpFileZipPath, tmpPath) var tmpFile = fs.readFileSync(tmpFilePath) var file = fs.readFileSync(filePath) t.deepEqual(tmpFile, file) t.end() })
BB.using( benchRequest().then(benchFetch).then(benchNiceFetch).then(benchCachedFetch).then(benchMemoFetch).disposer(() => rimraf.sync(CACHE)), () => { console.log('done!') } )
globby(['public/*', '!public/fonts', '!public/svg', '!public/images']) .then(function then(paths) { paths.map(function map(item) { rimraf.sync(item); }); });
test('unzipSync', function (t) { var tmpFilePath = path.join(tmpPath, 'file.txt') rimraf.sync(tmpFilePath) zip.unzipSync(fileZipPath, tmpPath) var tmpFile = fs.readFileSync(tmpFilePath) var file = fs.readFileSync(filePath) t.deepEqual(tmpFile, file) t.end() })
afterAll(async () => { const homedir = os.homedir() const clientWalletPath = `${homedir}/.indy_client/wallet/util-test` await rimraf.sync(clientWalletPath) })
spawn.sync('npm', ['install'], { cwd: `${projectName}`, stdio: 'inherit' }); spawn.sync('npm', ['install'], { cwd: `${projectName}/api`, stdio: 'inherit', }); spawn.sync('npm', ['install'], { cwd: `${projectName}/frontend`, stdio: 'inherit', }); } else { spawn.sync('yarn', { cwd: `${projectName}`, stdio: 'inherit' }); rimraf.sync(`${projectName}/.git`); rimraf.sync(`${projectName}/lib`); rimraf.sync(`${projectName}/LICENSE.md`); rimraf.sync(`${projectName}/CONTRIBUTING.md`); rimraf.sync(`${projectName}/.prettierrc`); rimraf.sync(`${projectName}/.github`); rimraf.sync(`${projectName}/CODE_OF_CONDUCT.md`);
afterEach(async () => { const homedir = os.homedir() const clientWalletPath = `${homedir}/.indy_client/wallet/${agencyUserWalletName}` await rimraf.sync(clientWalletPath) })