Skip to content

Commit ec4294d

Browse files
committed
Avoid test collisions by using different directories in runInTempDirectory
1 parent fccfd58 commit ec4294d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jest/runInTempDirectory.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import path from 'path'
33

44
import rimraf from 'rimraf'
55

6-
const tmpPath = path.resolve(__dirname, '../__tmp')
7-
86
export default function(callback) {
97
return new Promise(resolve => {
8+
const timestamp = new Date().valueOf()
9+
const tmpPath = path.resolve(__dirname, `../__tmp_${timestamp}`)
1010
const currentPath = process.cwd()
1111

1212
rimraf.sync(tmpPath)

0 commit comments

Comments
 (0)