@@ -9,20 +9,30 @@ describe('chunkByFilter', function() {
99 } ) ) ;
1010
1111 it ( 'should collect data into fixed-length chunks or blocks' , function ( ) {
12- expect ( filter ( [ 1 , 2 , 3 , 4 ] , 2 ) ) . toEqual ( [ [ 1 , 2 ] , [ 3 , 4 ] ] ) ;
13- expect ( filter ( [ 1 , 2 , 3 , 4 ] , 3 ) ) . toEqual ( [ [ 1 , 2 , 3 ] , [ 4 ] ] ) ;
12+ expect ( filter ( [ 1 , 2 , 3 , 4 ] , 2 ) ) . toEqual ( [ [ 1 , 2 ] , [ 3 , 4 ] ] ) ;
13+ } ) ;
14+ it ( 'should collect data into fixed-length chunks or blocks' , function ( ) {
15+ expect ( filter ( [ 1 , 2 , 3 , 4 ] , 3 ) ) . toEqual ( [ [ 1 , 2 , 3 ] , [ 4 ] ] ) ;
16+ } ) ;
17+ it ( 'should collect data into fixed-length chunks or blocks' , function ( ) {
1418 expect ( filter ( [ 'a' , 'b' , 'c' , 'd' ] , 4 ) ) . toEqual ( [ [ 'a' , 'b' , 'c' , 'd' ] ] ) ;
1519 } ) ;
1620
1721 it ( 'should get an fill-value and complete blocks that less than `n`' , function ( ) {
1822 expect ( filter ( [ 1 , 2 , 3 , 4 , 5 ] , 2 , 0 ) ) . toEqual ( [ [ 1 , 2 ] , [ 3 , 4 ] , [ 5 , 0 ] ] ) ;
23+ } ) ;
24+ it ( 'should get an fill-value and complete blocks that less than `n`' , function ( ) {
1925 expect ( filter ( [ 1 , 2 , 3 , 4 ] , 3 , 1 ) ) . toEqual ( [ [ 1 , 2 , 3 ] , [ 4 , 1 , 1 ] ] ) ;
2026 } ) ;
2127
2228 it ( 'should get a !collection and return it as-is' , function ( ) {
2329 expect ( filter ( ! 1 ) ) . toBeFalsy ( ) ;
2430 expect ( filter ( 1 ) ) . toEqual ( 1 ) ;
31+ } ) ;
32+ it ( 'should get a !collection and return it as-is' , function ( ) {
2533 expect ( filter ( 'string' ) ) . toEqual ( 'string' ) ;
34+ } ) ;
35+ it ( 'should get a !collection and return it as-is' , function ( ) {
2636 expect ( filter ( undefined ) ) . toEqual ( undefined ) ;
2737 } ) ;
2838} ) ;
0 commit comments