refactor(tests): instead of random temp dir names, use date

It is easier to debug when the folders are sorted
This commit is contained in:
Zoltan Kochan
2016-08-30 23:56:23 +03:00
parent 1f37f18ab4
commit 94de1f8e84

View File

@@ -15,7 +15,7 @@ const npmrc = [
fs.writeFileSync(join(tmpPath, '.npmrc'), npmrc, 'utf-8')
module.exports = function prepare (pkg) {
const pkgTmpPath = join(tmpPath, Math.random().toString())
const pkgTmpPath = join(tmpPath, Number(new Date()).toString())
mkdirp.sync(pkgTmpPath)
const json = JSON.stringify(pkg || {})
fs.writeFileSync(join(pkgTmpPath, 'package.json'), json, 'utf-8')