@@ -1292,21 +1292,21 @@ describe('Test lib.js:', function() {
1292
1292
expect ( this . array ) . toBe ( out ) ;
1293
1293
} ) ;
1294
1294
1295
- it ( 'should ignore falsy items' , function ( ) {
1295
+ it ( 'should ignore falsy items except 0 ' , function ( ) {
1296
1296
Lib . pushUnique ( this . array , false ) ;
1297
1297
expect ( this . array ) . toEqual ( [ 'a' , 'b' , 'c' , { a : 'A' } ] ) ;
1298
1298
1299
1299
Lib . pushUnique ( this . array , undefined ) ;
1300
1300
expect ( this . array ) . toEqual ( [ 'a' , 'b' , 'c' , { a : 'A' } ] ) ;
1301
1301
1302
- Lib . pushUnique ( this . array , 0 ) ;
1303
- expect ( this . array ) . toEqual ( [ 'a' , 'b' , 'c' , { a : 'A' } ] ) ;
1304
-
1305
1302
Lib . pushUnique ( this . array , null ) ;
1306
1303
expect ( this . array ) . toEqual ( [ 'a' , 'b' , 'c' , { a : 'A' } ] ) ;
1307
1304
1308
1305
Lib . pushUnique ( this . array , '' ) ;
1309
1306
expect ( this . array ) . toEqual ( [ 'a' , 'b' , 'c' , { a : 'A' } ] ) ;
1307
+
1308
+ Lib . pushUnique ( this . array , 0 ) ;
1309
+ expect ( this . array ) . toEqual ( [ 'a' , 'b' , 'c' , { a : 'A' } , 0 ] ) ;
1310
1310
} ) ;
1311
1311
1312
1312
it ( 'should ignore item already in array' , function ( ) {
0 commit comments