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 committed 2016-08-31 00:12:19 +03:00
1 parent 1f37f18ab4
commit 94de1f8e84
1 file changed
+1 -1
+1 -1
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')