@@ -72,7 +72,7 @@ describe("sortProducts", () => {
7272 [ "E" , "1" , "AB 1" ] ,
7373 [ "F" , "1" , "AB 10" ] ,
7474 [ "H" , "1" , "AB 9" ] ,
75- [ "H " , "1" , "AB 7" ]
75+ [ "J " , "1" , "AB 7" ]
7676 ] ;
7777 const [ columns , ...rows ] = data ;
7878
@@ -82,7 +82,7 @@ describe("sortProducts", () => {
8282 expect ( result ) . toEqual ( [
8383 [ "product_code" , "quantity" , "pick_location" ] ,
8484 [ "E" , "1" , "AB 1" ] ,
85- [ "H " , "1" , "AB 7" ] ,
85+ [ "J " , "1" , "AB 7" ] ,
8686 [ "H" , "1" , "AB 9" ] ,
8787 [ "F" , "1" , "AB 10" ]
8888 ] ) ;
@@ -92,13 +92,14 @@ describe("sortProducts", () => {
9292 const data : ProductTuple [ ] = [
9393 [ "product_code" , "quantity" , "pick_location" ] ,
9494 [ "B1237" , "2" , "A 10" ] ,
95- [ "B1237" , "2" , "Z 10" ] ,
95+ [ "B1237" , "2" , "A 10" ] ,
96+ [ "B12311" , "2" , "Z 10" ] ,
9697 [ "B1234" , "2" , "Z 3" ] ,
97- [ "B1234 " , "2" , "A 3" ] ,
98- [ "B1235 " , "3" , "Z 2" ] ,
99- [ "B1236 " , "4" , "Z 1" ] ,
100- [ "B1235 " , "3" , "A 2" ] ,
101- [ "B1236 " , "4" , "A 1" ]
98+ [ "B1235 " , "2" , "A 3" ] ,
99+ [ "B1236 " , "3" , "Z 2" ] ,
100+ [ "B1238 " , "4" , "Z 1" ] ,
101+ [ "B1239 " , "3" , "A 2" ] ,
102+ [ "B12310 " , "4" , "A 1" ]
102103 ] ;
103104
104105 const [ columns , ...rows ] = data ;
@@ -107,14 +108,14 @@ describe("sortProducts", () => {
107108 const result = [ columns , ...sortedRows ] ;
108109 expect ( result ) . toEqual ( [
109110 [ "product_code" , "quantity" , "pick_location" ] ,
110- [ "B1236 " , "4" , "A 1" ] ,
111- [ "B1235 " , "3" , "A 2" ] ,
112- [ "B1234 " , "2" , "A 3" ] ,
113- [ "B1237" , "2 " , "A 10" ] ,
114- [ "B1236 " , "4" , "Z 1" ] ,
115- [ "B1235 " , "3" , "Z 2" ] ,
111+ [ "B12310 " , "4" , "A 1" ] ,
112+ [ "B1239 " , "3" , "A 2" ] ,
113+ [ "B1235 " , "2" , "A 3" ] ,
114+ [ "B1237" , "4 " , "A 10" ] ,
115+ [ "B1238 " , "4" , "Z 1" ] ,
116+ [ "B1236 " , "3" , "Z 2" ] ,
116117 [ "B1234" , "2" , "Z 3" ] ,
117- [ "B1237 " , "2" , "Z 10" ]
118+ [ "B12311 " , "2" , "Z 10" ]
118119 ] ) ;
119120 } ) ;
120121} ) ;
@@ -219,7 +220,6 @@ describe("compareStrings", () => {
219220 expect ( ( ) => compareStrings ( "AB" , "ABC" ) ) . toThrowError ( ) ;
220221 expect ( ( ) => compareStrings ( "AB" , "AB" ) ) . not . toThrowError ( ) ;
221222 } ) ;
222- // });
223223 describe ( "single char" , ( ) => {
224224 // Case 1: A, A - single chars, both match
225225 it ( "should return EQUALS if single chars, both match" , ( ) => {
0 commit comments