File tree Expand file tree Collapse file tree 1 file changed +16
-14
lines changed Expand file tree Collapse file tree 1 file changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -300,23 +300,25 @@ suite('Raw FileSystem', () => {
300
300
if ( stat . type === FileType . File ) {
301
301
old ! . setup ( s => s . isFile ( ) )
302
302
. returns ( ( ) => true ) ;
303
+ } else if ( stat . type === FileType . Directory ) {
304
+ old ! . setup ( s => s . isFile ( ) )
305
+ . returns ( ( ) => false ) ;
306
+ old ! . setup ( s => s . isDirectory ( ) )
307
+ . returns ( ( ) => true ) ;
308
+ } else if ( stat . type === FileType . SymbolicLink ) {
309
+ old ! . setup ( s => s . isFile ( ) )
310
+ . returns ( ( ) => false ) ;
311
+ old ! . setup ( s => s . isDirectory ( ) )
312
+ . returns ( ( ) => false ) ;
313
+ old ! . setup ( s => s . isSymbolicLink ( ) )
314
+ . returns ( ( ) => true ) ;
303
315
} else {
304
316
old ! . setup ( s => s . isFile ( ) )
305
317
. returns ( ( ) => false ) ;
306
- if ( stat . type === FileType . Directory ) {
307
- old ! . setup ( s => s . isDirectory ( ) )
308
- . returns ( ( ) => true ) ;
309
- } else {
310
- old ! . setup ( s => s . isDirectory ( ) )
311
- . returns ( ( ) => false ) ;
312
- if ( stat . type === FileType . SymbolicLink ) {
313
- old ! . setup ( s => s . isSymbolicLink ( ) )
314
- . returns ( ( ) => true ) ;
315
- } else {
316
- old ! . setup ( s => s . isSymbolicLink ( ) )
317
- . returns ( ( ) => false ) ;
318
- }
319
- }
318
+ old ! . setup ( s => s . isDirectory ( ) )
319
+ . returns ( ( ) => false ) ;
320
+ old ! . setup ( s => s . isSymbolicLink ( ) )
321
+ . returns ( ( ) => false ) ;
320
322
}
321
323
old ! . setup ( s => s . size )
322
324
. returns ( ( ) => stat . size ) ;
You can’t perform that action at this time.
0 commit comments