@@ -15,7 +15,7 @@ describe('fs.readdirSyncRecursive()', function () {
15
15
16
16
it ( 'should work at the root with a filter' , function ( ) {
17
17
var files = read ( path . join ( __dirname , '..' ) , function ( name ) {
18
- return name [ 0 ] !== '.' && name !== 'node_modules' && name !== 'coverage'
18
+ return name [ 0 ] !== '.' && name !== 'node_modules' && name !== 'coverage' && name !== 'package-lock.json'
19
19
} )
20
20
21
21
files . length . should . equal ( 5 )
@@ -29,6 +29,21 @@ describe('fs.readdirSyncRecursive()', function () {
29
29
30
30
} )
31
31
32
+ it ( 'should filter pass dir' , function ( ) {
33
+ var files = read ( path . join ( __dirname , '..' ) , function ( name , index , dir ) {
34
+ return name [ 0 ] !== '.' && name !== 'node_modules' && name !== 'coverage' && dir !== __dirname && name !== 'package-lock.json'
35
+ } )
36
+
37
+ files . length . should . equal ( 4 )
38
+ files . sort ( ) . should . eql ( [
39
+ 'index.js' ,
40
+ 'LICENSE' ,
41
+ 'package.json' ,
42
+ 'README.md'
43
+ ] . sort ( ) )
44
+
45
+ } )
46
+
32
47
it ( 'should work with the symlinked file' , function ( ) {
33
48
try {
34
49
var linkname = __filename + '-link'
@@ -69,7 +84,7 @@ describe('fs.readdirSyncRecursive()', function () {
69
84
fs . symlinkSync ( path . join ( __dirname , '..' ) , linkname , 'dir' )
70
85
71
86
var files = read ( linkname , function ( name ) {
72
- return name [ 0 ] !== '.' && name !== 'node_modules' && name !== 'coverage'
87
+ return name [ 0 ] !== '.' && name !== 'node_modules' && name !== 'coverage' && name !== 'package-lock.json'
73
88
} )
74
89
75
90
files . length . should . equal ( 5 )
0 commit comments