From 94de1f8e847326b37507bf7627f5c95ba8f5c0d2 Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Tue, 30 Aug 2016 23:56:23 +0300 Subject: [PATCH] refactor(tests): instead of random temp dir names, use date It is easier to debug when the folders are sorted --- test/support/prepare.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/support/prepare.js b/test/support/prepare.js index a6b83965a5..afa997821d 100644 --- a/test/support/prepare.js +++ b/test/support/prepare.js @@ -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')