File tree Expand file tree Collapse file tree 1 file changed +17
-6
lines changed
test/sorting/most-significant-digit Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -9,15 +9,26 @@ describe('Most-Significant Digit', function () {
99
1010 it ( 'should work with arrays with a single element' , function ( ) {
1111 var arr = [ 'a' ] ;
12- expect ( msd ( arr ) . length ) . toBe ( 1 ) ;
13- expect ( msd ( arr ) [ 0 ] ) . toBe ( 'a' ) ;
12+ msd ( arr ) ;
13+ expect ( arr . length ) . toBe ( 1 ) ;
14+ expect ( arr [ 0 ] ) . toBe ( 'a' ) ;
1415 } ) ;
1516
1617 it ( 'should work with arrays with equally length strings' , function ( ) {
17- var arr = [ 'a' ] ;
18- expect ( msd ( arr ) . length ) . toBe ( 1 ) ;
19- expect ( msd ( arr ) [ 0 ] ) . toBe ( 'a' ) ;
18+ var arr = [ 'bb' , 'aa' , 'cc' ] ;
19+ msd ( arr ) ;
20+ expect ( arr . length ) . toBe ( 3 ) ;
21+ expect ( arr [ 0 ] ) . toBe ( 'aa' ) ;
22+ expect ( arr [ 1 ] ) . toBe ( 'bb' ) ;
23+ expect ( arr [ 2 ] ) . toBe ( 'cc' ) ;
2024 } ) ;
2125
22-
26+ it ( 'should work with arrays with equally length strings' , function ( ) {
27+ var arr = [ 'bb' , 'aa' , 'cc' ] ;
28+ msd ( arr ) ;
29+ expect ( arr . length ) . toBe ( 3 ) ;
30+ expect ( arr [ 0 ] ) . toBe ( 'aa' ) ;
31+ expect ( arr [ 1 ] ) . toBe ( 'bb' ) ;
32+ expect ( arr [ 2 ] ) . toBe ( 'cc' ) ;
33+ } ) ;
2334} ) ;
You can’t perform that action at this time.
0 commit comments