From 11dfbdeaa8d3b47b2a53045036f21446e526d0cd Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Thu, 9 May 2019 13:29:48 +0200 Subject: [PATCH] Use `process.env.JEST_WORKER_ID` --- jest/runInTempDirectory.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jest/runInTempDirectory.js b/jest/runInTempDirectory.js index cddd8246c..025361045 100644 --- a/jest/runInTempDirectory.js +++ b/jest/runInTempDirectory.js @@ -5,8 +5,8 @@ import rimraf from 'rimraf' export default function(callback) { return new Promise(resolve => { - const timestamp = new Date().valueOf() - const tmpPath = path.resolve(__dirname, `../__tmp_${timestamp}`) + const workerId = process.env.JEST_WORKER_ID + const tmpPath = path.resolve(__dirname, `../__tmp_${workerId}`) const currentPath = process.cwd() rimraf.sync(tmpPath)