File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,15 @@ const t = require('tap')
3
3
// load up the posix and windows versions of the reserver
4
4
if ( process . platform === 'win32' )
5
5
process . env . TESTING_TAR_FAKE_PLATFORM = 'posix'
6
- const { reserve } = require ( '../lib/path-reservations.js' ) ( )
6
+ const { reserve } = t . mock ( '../lib/path-reservations.js' , {
7
+ path : require ( 'path' ) . posix ,
8
+ } ) ( )
7
9
delete process . env . TESTING_TAR_FAKE_PLATFORM
8
10
if ( process . platform !== 'win32' )
9
11
process . env . TESTING_TAR_FAKE_PLATFORM = 'win32'
10
- const { reserve : winReserve } = t . mock ( '../lib/path-reservations.js' ) ( )
12
+ const { reserve : winReserve } = t . mock ( '../lib/path-reservations.js' , {
13
+ path : require ( 'path' ) . win32 ,
14
+ } ) ( )
11
15
12
16
t . test ( 'basic race' , t => {
13
17
// simulate the race conditions we care about
You can’t perform that action at this time.
0 commit comments