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 @@ -145,23 +145,25 @@ suite('Raw FileSystem', () => {
145
145
if ( stat . type === FileType . File ) {
146
146
old ! . setup ( s => s . isFile ( ) )
147
147
. returns ( ( ) => true ) ;
148
+ } else if ( stat . type === FileType . Directory ) {
149
+ old ! . setup ( s => s . isFile ( ) )
150
+ . returns ( ( ) => false ) ;
151
+ old ! . setup ( s => s . isDirectory ( ) )
152
+ . returns ( ( ) => true ) ;
153
+ } else if ( stat . type === FileType . SymbolicLink ) {
154
+ old ! . setup ( s => s . isFile ( ) )
155
+ . returns ( ( ) => false ) ;
156
+ old ! . setup ( s => s . isDirectory ( ) )
157
+ . returns ( ( ) => false ) ;
158
+ old ! . setup ( s => s . isSymbolicLink ( ) )
159
+ . returns ( ( ) => true ) ;
148
160
} else {
149
161
old ! . setup ( s => s . isFile ( ) )
150
162
. returns ( ( ) => false ) ;
151
- if ( stat . type === FileType . Directory ) {
152
- old ! . setup ( s => s . isDirectory ( ) )
153
- . returns ( ( ) => true ) ;
154
- } else {
155
- old ! . setup ( s => s . isDirectory ( ) )
156
- . returns ( ( ) => false ) ;
157
- if ( stat . type === FileType . SymbolicLink ) {
158
- old ! . setup ( s => s . isSymbolicLink ( ) )
159
- . returns ( ( ) => true ) ;
160
- } else {
161
- old ! . setup ( s => s . isSymbolicLink ( ) )
162
- . returns ( ( ) => false ) ;
163
- }
164
- }
163
+ old ! . setup ( s => s . isDirectory ( ) )
164
+ . returns ( ( ) => false ) ;
165
+ old ! . setup ( s => s . isSymbolicLink ( ) )
166
+ . returns ( ( ) => false ) ;
165
167
}
166
168
old ! . setup ( s => s . size )
167
169
. returns ( ( ) => stat . size ) ;
You can’t perform that action at this time.
0 commit comments