Avoid test collisions by using different directories in runInTempDirectory
This commit is contained in:
parent
fccfd58976
commit
ec4294d124
1 changed files with 2 additions and 2 deletions
|
|
@ -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 timestamp = new Date().valueOf()
|
||||
const tmpPath = path.resolve(__dirname, `../__tmp_${timestamp}`)
|
||||
const currentPath = process.cwd()
|
||||
|
||||
rimraf.sync(tmpPath)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue