@@ -19,7 +19,7 @@ function getFullPath(filename) {
19
19
}
20
20
21
21
const fullPath = path . join ( __dirname , '../../' , filename ) ;
22
- return fullPath . charAt ( 0 ) . toLowerCase ( ) + fullPath . slice ( 1 ) ;
22
+ return fullPath ;
23
23
}
24
24
25
25
describe ( 'Multipart' , ( ) => {
@@ -104,7 +104,14 @@ describe('Multipart', () => {
104
104
assert . ok ( Boolean ( error ) , 'Request should have failed.' ) ;
105
105
error . code . should . equal ( 'ENOENT' ) ;
106
106
error . message . should . containEql ( 'ENOENT' ) ;
107
- error . path . should . equal ( getFullPath ( 'foo' ) ) ;
107
+ if ( IS_WINDOWS ) {
108
+ error . path . toLowerCase ( ) . should . equal (
109
+ getFullPath ( 'foo' ) . toLowerCase ( )
110
+ ) ;
111
+ } else {
112
+ error . path . should . equal ( getFullPath ( 'foo' ) ) ;
113
+ }
114
+
108
115
done ( ) ;
109
116
} ) ;
110
117
} ) ;
@@ -118,7 +125,14 @@ describe('Multipart', () => {
118
125
( res ) => assert . fail ( 'It should not allow this' ) ,
119
126
( err ) => {
120
127
err . code . should . equal ( 'ENOENT' ) ;
121
- err . path . should . equal ( getFullPath ( 'does-not-exist.txt' ) ) ;
128
+ if ( IS_WINDOWS ) {
129
+ err . path . toLowerCase ( ) . should . equal (
130
+ getFullPath ( 'does-not-exist.txt' ) . toLowerCase ( )
131
+ ) ;
132
+ } else {
133
+ err . path . should . equal ( getFullPath ( 'does-not-exist.txt' ) ) ;
134
+ }
135
+
122
136
}
123
137
) ;
124
138
} ) ;
@@ -190,9 +204,16 @@ describe('Multipart', () => {
190
204
. end ( ( error , res ) => {
191
205
assert . ok ( Boolean ( error ) , 'Request should have failed.' ) ;
192
206
error . code . should . equal ( 'ENOENT' ) ;
193
- error . path . should . equal (
194
- getFullPath ( 'test/node/fixtures/non-existent-file.ext' )
195
- ) ;
207
+ if ( IS_WINDOWS ) {
208
+ error . path . toLowerCase ( ) . should . equal (
209
+ getFullPath ( 'test/node/fixtures/non-existent-file.ext' ) . toLowerCase ( )
210
+ ) ;
211
+ } else {
212
+ error . path . should . equal (
213
+ getFullPath ( 'test/node/fixtures/non-existent-file.ext' )
214
+ ) ;
215
+ }
216
+
196
217
done ( ) ;
197
218
} ) ;
198
219
} ) ;
0 commit comments