@@ -20,7 +20,7 @@ test('constants with CHECKOUT', async function (t) {
20
20
21
21
return {
22
22
teardown : ( ) => {
23
- delete require . cache [ `file:// ${ require . resolve ( '../constants' ) } ` ]
23
+ delete require . cache [ pathToFileURL ( require . resolve ( '../constants' ) ) ]
24
24
global . Pear = null
25
25
}
26
26
}
@@ -48,7 +48,7 @@ test('constants with default MOUNT', async function (t) {
48
48
49
49
return {
50
50
teardown : ( ) => {
51
- delete require . cache [ `file:// ${ require . resolve ( '../constants' ) } ` ]
51
+ delete require . cache [ pathToFileURL ( require . resolve ( '../constants' ) ) ]
52
52
global . Pear = null
53
53
}
54
54
}
@@ -61,7 +61,7 @@ test('constants with default MOUNT', async function (t) {
61
61
t . ok ( constants . MOUNT === pathToFileURL ( dirname ) . href )
62
62
} )
63
63
64
- test ( 'constants with MOUNT starting with c:' , { skip : isWindows } , async function ( t ) {
64
+ test ( 'constants with MOUNT starting with c:' , async function ( t ) {
65
65
t . plan ( 1 )
66
66
67
67
const rig = ( ) => {
@@ -74,7 +74,7 @@ test('constants with MOUNT starting with c:', { skip: isWindows }, async functio
74
74
75
75
return {
76
76
teardown : ( ) => {
77
- delete require . cache [ `file:// ${ require . resolve ( '../constants' ) } ` ]
77
+ delete require . cache [ pathToFileURL ( require . resolve ( '../constants' ) ) ]
78
78
global . Pear = null
79
79
}
80
80
}
@@ -84,7 +84,7 @@ test('constants with MOUNT starting with c:', { skip: isWindows }, async functio
84
84
t . teardown ( teardown )
85
85
86
86
const constants = require ( '../constants' )
87
- t . ok ( constants . MOUNT === 'file:/// c:/custom/mount')
87
+ t . ok ( constants . MOUNT === pathToFileURL ( ' c:/custom/mount') . href )
88
88
} )
89
89
90
90
test ( 'constants with MOUNT starting with file:' , { skip : isWindows } , async function ( t ) {
@@ -100,7 +100,7 @@ test('constants with MOUNT starting with file:', { skip: isWindows }, async func
100
100
101
101
return {
102
102
teardown : ( ) => {
103
- delete require . cache [ `file:// ${ require . resolve ( '../constants' ) } ` ]
103
+ delete require . cache [ pathToFileURL ( require . resolve ( '../constants' ) ) ]
104
104
global . Pear = null
105
105
}
106
106
}
@@ -126,7 +126,7 @@ test('constants with MOUNT starting with ./', { skip: isWindows }, async functio
126
126
127
127
return {
128
128
teardown : ( ) => {
129
- delete require . cache [ `file:// ${ require . resolve ( '../constants' ) } ` ]
129
+ delete require . cache [ pathToFileURL ( require . resolve ( '../constants' ) ) ]
130
130
global . Pear = null
131
131
}
132
132
}
@@ -152,7 +152,7 @@ test('constants with MOUNT starting with ../', { skip: isWindows }, async functi
152
152
153
153
return {
154
154
teardown : ( ) => {
155
- delete require . cache [ `file:// ${ require . resolve ( '../constants' ) } ` ]
155
+ delete require . cache [ pathToFileURL ( require . resolve ( '../constants' ) ) ]
156
156
global . Pear = null
157
157
}
158
158
}
@@ -178,7 +178,7 @@ test('constants with MOUNT starting with /', { skip: isWindows }, async function
178
178
179
179
return {
180
180
teardown : ( ) => {
181
- delete require . cache [ `file:// ${ require . resolve ( '../constants' ) } ` ]
181
+ delete require . cache [ pathToFileURL ( require . resolve ( '../constants' ) ) ]
182
182
global . Pear = null
183
183
}
184
184
}
@@ -204,7 +204,7 @@ test('constants with MOUNT starting with pear://', { skip: isWindows }, async fu
204
204
205
205
return {
206
206
teardown : ( ) => {
207
- delete require . cache [ `file:// ${ require . resolve ( '../constants' ) } ` ]
207
+ delete require . cache [ pathToFileURL ( require . resolve ( '../constants' ) ) ]
208
208
global . Pear = null
209
209
}
210
210
}
0 commit comments