@@ -63,76 +63,6 @@ describe('ContentBase', () => {
63
63
} ) ;
64
64
} ) ;
65
65
66
- describe ( 'test ignoring node_modules folder by Default' , ( ) => {
67
- beforeAll ( ( done ) => {
68
- server = testServer . start ( config , {
69
- contentBase : contentBasePublic ,
70
- watchContentBase : true ,
71
- } ) ;
72
- // making sure that chokidar has read all the files
73
- server . contentBaseWatchers [ 0 ] . on ( 'ready' , ( ) => {
74
- done ( ) ;
75
- } ) ;
76
- req = request ( server . app ) ;
77
- } ) ;
78
-
79
- afterAll ( ( done ) => {
80
- testServer . close ( ( ) => {
81
- done ( ) ;
82
- } ) ;
83
- } ) ;
84
-
85
- it ( 'Should ignore node_modules & watch bar' , ( done ) => {
86
- const watchedPaths = server . contentBaseWatchers [ 0 ] . getWatched ( ) ;
87
- // check if node_modules folder is not in watched list
88
- const folderWatched = ! ! watchedPaths [
89
- path . join ( contentBasePublic , 'node_modules' )
90
- ] ;
91
- expect ( folderWatched ) . toEqual ( false ) ;
92
- // check if bar folder is in watched list
93
- expect ( watchedPaths [ path . join ( contentBasePublic , 'bar' ) ] ) . toEqual ( [
94
- 'index.html' ,
95
- ] ) ;
96
-
97
- done ( ) ;
98
- } ) ;
99
- } ) ;
100
-
101
- describe ( 'test not ignoring node_modules folder' , ( ) => {
102
- beforeAll ( ( done ) => {
103
- server = testServer . start ( config , {
104
- contentBase : contentBasePublic ,
105
- watchContentBase : true ,
106
- watchOptions : {
107
- ignored : / b a r / ,
108
- } ,
109
- } ) ;
110
- // making sure that chokidar has read all the files
111
- server . contentBaseWatchers [ 0 ] . on ( 'ready' , ( ) => {
112
- done ( ) ;
113
- } ) ;
114
- req = request ( server . app ) ;
115
- } ) ;
116
-
117
- afterAll ( ( done ) => {
118
- testServer . close ( ( ) => {
119
- done ( ) ;
120
- } ) ;
121
- } ) ;
122
-
123
- it ( 'Should watch node_modules & ignore bar' , ( done ) => {
124
- const watchedPaths = server . contentBaseWatchers [ 0 ] . getWatched ( ) ;
125
- // check if node_modules folder is in watched list
126
- expect (
127
- watchedPaths [ path . join ( contentBasePublic , 'node_modules' ) ]
128
- ) . toEqual ( [ 'index.html' ] ) ;
129
- // check if bar folder is not in watched list
130
- const folderWatched = ! ! watchedPaths [ path . join ( contentBasePublic , 'bar' ) ] ;
131
- expect ( folderWatched ) . toEqual ( false ) ;
132
- done ( ) ;
133
- } ) ;
134
- } ) ;
135
-
136
66
describe ( 'test listing files in folders without index.html using the option serveIndex:false' , ( ) => {
137
67
beforeAll ( ( done ) => {
138
68
server = testServer . start (
0 commit comments