@@ -162,6 +162,7 @@ describe("helpers", function(){
162
162
163
163
it ( 'should return true if file begins with underscore.' , function ( done ) {
164
164
polymer . helpers . shouldIgnore ( '_foo.html' ) . should . be . true
165
+ polymer . helpers . shouldIgnore ( '%5ffoo.html' ) . should . be . true
165
166
done ( )
166
167
} )
167
168
@@ -170,6 +171,10 @@ describe("helpers", function(){
170
171
polymer . helpers . shouldIgnore ( 'foo_.html' ) . should . be . false
171
172
polymer . helpers . shouldIgnore ( 'f_oo.html' ) . should . be . false
172
173
polymer . helpers . shouldIgnore ( 'f____.html' ) . should . be . false
174
+ polymer . helpers . shouldIgnore ( 'foo.html' ) . should . be . false
175
+ polymer . helpers . shouldIgnore ( 'foo%5f.html' ) . should . be . false
176
+ polymer . helpers . shouldIgnore ( 'f%5foo.html' ) . should . be . false
177
+ polymer . helpers . shouldIgnore ( 'f%5f%5f%5f%5f.html' ) . should . be . false
173
178
done ( )
174
179
} )
175
180
@@ -178,30 +183,33 @@ describe("helpers", function(){
178
183
polymer . helpers . shouldIgnore ( path . join ( 'foo' , '_bar' , 'baz.html' ) ) . should . be . true
179
184
polymer . helpers . shouldIgnore ( path . join ( '_foo' , 'bar' , 'baz.html' ) ) . should . be . true
180
185
polymer . helpers . shouldIgnore ( path . sep + path . join ( '_foo' , 'bar' , 'baz.html' ) ) . should . be . true
186
+ polymer . helpers . shouldIgnore ( path . join ( 'foo' , '%5fbar.html' ) ) . should . be . true
187
+ polymer . helpers . shouldIgnore ( path . join ( 'foo' , '%5fbar' , 'baz.html' ) ) . should . be . true
188
+ polymer . helpers . shouldIgnore ( path . join ( '%5ffoo' , 'bar' , 'baz.html' ) ) . should . be . true
189
+ polymer . helpers . shouldIgnore ( path . sep + path . join ( '%5ffoo' , 'bar' , 'baz.html' ) ) . should . be . true
181
190
done ( )
182
191
} )
183
192
184
193
it ( 'should ignore if starts with underscore.' , function ( done ) {
185
- var reply = polymer . helpers . shouldIgnore ( '_beep.json' )
186
- reply . should . be . true
194
+ polymer . helpers . shouldIgnore ( '_beep.json' ) . should . be . true
195
+ polymer . helpers . shouldIgnore ( '%5fbeep.json' ) . should . be . true
187
196
done ( )
188
197
} )
189
198
190
199
it ( 'should not ignore if doesnt start with underscore.' , function ( done ) {
191
- var reply = polymer . helpers . shouldIgnore ( 'boop.json' )
192
- reply . should . be . false
200
+ polymer . helpers . shouldIgnore ( 'boop.json' ) . should . be . false
193
201
done ( )
194
202
} )
195
203
196
204
it ( 'should ignore if nested file starts with underscore.' , function ( done ) {
197
- var reply = polymer . helpers . shouldIgnore ( path . join ( 'beep' , '_boop.json' ) )
198
- reply . should . be . true
205
+ polymer . helpers . shouldIgnore ( path . join ( 'beep' , '_boop.json' ) ) . should . be . true
206
+ polymer . helpers . shouldIgnore ( path . join ( 'beep' , '%5fboop.json' ) ) . should . be . true
199
207
done ( )
200
208
} )
201
209
202
210
it ( 'should ignore any part of tree starts with underscore.' , function ( done ) {
203
- var reply = polymer . helpers . shouldIgnore ( path . join ( 'foo' , '_bar' , 'baz.json' ) )
204
- reply . should . be . true
211
+ polymer . helpers . shouldIgnore ( path . join ( 'foo' , '_bar' , 'baz.json' ) ) . should . be . true
212
+ polymer . helpers . shouldIgnore ( path . join ( 'foo' , '%5fbar' , 'baz.json' ) ) . should . be . true
205
213
done ( )
206
214
} )
207
215
@@ -224,8 +232,8 @@ describe("helpers", function(){
224
232
} )
225
233
226
234
it ( 'should allow underscore in names.' , function ( done ) {
227
- var reply = polymer . helpers . shouldIgnore ( path . join ( 'foo_' , 'beep.json' ) )
228
- reply . should . be . false
235
+ polymer . helpers . shouldIgnore ( path . join ( 'foo_' , 'beep.json' ) ) . should . be . false
236
+ polymer . helpers . shouldIgnore ( path . join ( 'foo%5f' , 'beep.json' ) ) . should . be . false
229
237
done ( )
230
238
} )
231
239
0 commit comments