@@ -178,7 +178,7 @@ tap.test('test Pattern capitalizes patternDisplayName correctly', function(
178
178
test . end ( ) ;
179
179
} ) ;
180
180
181
- tap . test ( 'test Pattern get dir level no sepatated pattern directory' , function (
181
+ tap . test ( 'test Pattern get dir level no separated pattern directory' , function (
182
182
test
183
183
) {
184
184
var p = new Pattern ( '00-atoms/00-global/00-colors-alt.mustache' , { d : 123 } ) ;
@@ -198,24 +198,36 @@ tap.test('test Pattern get dir level no sepatated pattern directory', function(
198
198
} ) ;
199
199
200
200
tap . test (
201
- 'test Pattern get dir level with sepatated pattern directory' ,
201
+ 'test Pattern get dir level with separated pattern directory' ,
202
202
function ( test ) {
203
203
var p = new Pattern (
204
204
'00-atoms/00-global/00-colors-alt/colors-alt.mustache' ,
205
205
{ d : 123 }
206
206
) ;
207
207
test . equals ( p . getDirLevel ( 0 , { hasDir : true , dirLevel : 3 } ) , '00-atoms' ) ;
208
208
test . equals ( p . getDirLevel ( 1 , { hasDir : true , dirLevel : 3 } ) , '00-global' ) ;
209
- test . equals ( p . getDirLevel ( 3 , { hasDir : true , dirLevel : 3 } ) , '' ) ;
209
+ test . equals (
210
+ p . getDirLevel ( 3 , { hasDir : true , dirLevel : 3 } ) ,
211
+ '00-colors-alt'
212
+ ) ;
210
213
var p = new Pattern ( '00-atoms/00-colors-alt/colors-alt.mustache' , {
211
214
d : 123 ,
212
215
} ) ;
213
216
test . equals ( p . getDirLevel ( 0 , { hasDir : true , dirLevel : 2 } ) , '00-atoms' ) ;
214
- test . equals ( p . getDirLevel ( 1 , { hasDir : true , dirLevel : 2 } ) , '00-atoms' ) ;
217
+ test . equals (
218
+ p . getDirLevel ( 1 , { hasDir : true , dirLevel : 2 } ) ,
219
+ '00-colors-alt'
220
+ ) ;
215
221
test . equals ( p . getDirLevel ( 3 , { hasDir : true , dirLevel : 2 } ) , '' ) ;
216
222
var p = new Pattern ( '00-colors-alt/colors-alt.mustache' , { d : 123 } ) ;
217
- test . equals ( p . getDirLevel ( 0 , { hasDir : true , dirLevel : 1 } ) , '' ) ;
218
- test . equals ( p . getDirLevel ( 1 , { hasDir : true , dirLevel : 1 } ) , '' ) ;
223
+ test . equals (
224
+ p . getDirLevel ( 0 , { hasDir : true , dirLevel : 1 } ) ,
225
+ '00-colors-alt'
226
+ ) ;
227
+ test . equals (
228
+ p . getDirLevel ( 1 , { hasDir : true , dirLevel : 1 } ) ,
229
+ '00-colors-alt'
230
+ ) ;
219
231
test . equals ( p . getDirLevel ( 3 , { hasDir : true , dirLevel : 1 } ) , '' ) ;
220
232
test . end ( ) ;
221
233
}
0 commit comments