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')
33// load up the posix and windows versions of the reserver
44if ( process . platform === 'win32' )
55 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+ } ) ( )
79delete process . env . TESTING_TAR_FAKE_PLATFORM
810if ( process . platform !== 'win32' )
911 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+ } ) ( )
1115
1216t . test ( 'basic race' , t => {
1317 // simulate the race conditions we care about
You can’t perform that action at this time.
0 commit comments