diff --git a/jest/runInTempDirectory.js b/jest/runInTempDirectory.js index c6d025eb3..025361045 100644 --- a/jest/runInTempDirectory.js +++ b/jest/runInTempDirectory.js @@ -3,10 +3,10 @@ import path from 'path' import rimraf from 'rimraf' -const tmpPath = path.resolve(__dirname, '../__tmp') - export default function(callback) { return new Promise(resolve => { + const workerId = process.env.JEST_WORKER_ID + const tmpPath = path.resolve(__dirname, `../__tmp_${workerId}`) const currentPath = process.cwd() rimraf.sync(tmpPath)