Use process.env.JEST_WORKER_ID
This commit is contained in:
parent
ec4294d124
commit
11dfbdeaa8
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue