@@ -22,21 +22,22 @@ function getRootEntries(root: string, withBase: boolean = false): string[] {
22
22
function getRootEntriesWithFileTypes ( root : string ) : string [ ] {
23
23
return fs . readdirSync ( root , { withFileTypes : true } )
24
24
. filter ( ( item ) => ! item . name . startsWith ( '.' ) )
25
- . filter ( ( item ) => item . isFile ( ) )
25
+ . filter ( ( item ) => ! item . isDirectory ( ) )
26
26
. map ( ( item ) => item . name ) ;
27
27
}
28
28
29
29
runner . suite ( 'Patterns Root' , {
30
30
tests : [
31
31
{
32
32
pattern : '/*' ,
33
+ options : { followSymbolicLinks : false } ,
33
34
condition : ( ) => ! utils . platform . isWindows ( ) ,
34
35
expected : ( ) => getRootEntries ( ROOT , /** withBase */ true ) ,
35
36
} ,
36
37
{
37
- pattern : '/tmp /*' ,
38
+ pattern : '/usr /*' ,
38
39
condition : ( ) => ! utils . platform . isWindows ( ) ,
39
- expected : ( ) => getRootEntries ( '/tmp ' , /** withBase */ true ) ,
40
+ expected : ( ) => getRootEntries ( '/usr ' , /** withBase */ true ) ,
40
41
} ,
41
42
{
42
43
pattern : '/*' ,
@@ -58,6 +59,7 @@ runner.suite('Patterns Root (cwd)', {
58
59
pattern : '*' ,
59
60
options : {
60
61
cwd : ROOT ,
62
+ followSymbolicLinks : false ,
61
63
} ,
62
64
condition : ( ) => ! utils . platform . isWindows ( ) ,
63
65
expected : ( ) => getRootEntries ( ROOT ) ,
0 commit comments