@@ -8,27 +8,27 @@ const atm = new AstToMathJs();
88
99describe ( "splitInequality" , ( ) => {
1010 it . each `
11- compoundInequality | leftPart | rightPart
12- ${ "20>x>7" } | ${ "20>x" } | ${ "x>7" }
13- ${ " 5 ≥ -4 + x > -1 - 1" } | ${ " 5 ≥ -4 + x" } | ${ "-4 + x > -1 - 1" }
14- ${ "x/x<x+y≤1.5*2" } | ${ "x/x<x+y" } | ${ "x+y≤1.5*2" }
15- ${ "2 < 4x > 20" } | ${ "2<4x" } | ${ "4x>20" }
16- ${ "-3 < 2x+5 < 17" } | ${ "-3<2x+5" } | ${ "2x+5 < 17" }
17- ${ "-3 = 6x = -3" } | ${ "-3 = 6x" } | ${ "6x = -3" }
18- ${ "a≥b≥c " } | ${ "a≥b" } | ${ "b≥c" }
19- ${ "a+2≥b-10≥c-100 " } | ${ "a+2≥b-10" } | ${ "b-10≥c-100" }
20- ${ "a≠b≠c " } | ${ "a≠b" } | ${ "b≠c" }
11+ compoundInequality | leftPart | rightPart
12+ ${ "20>x>7" } | ${ "20>x" } | ${ "x>7" }
13+ ${ " 5 ≥ -4 + x > -1 - 1" } | ${ " 5 ≥ -4 + x" } | ${ "-4 + x > -1 - 1" }
14+ ${ "x/x<x+y≤1.5*2" } | ${ "x/x<x+y" } | ${ "x+y≤1.5*2" }
15+ ${ "2 < 4x > 20" } | ${ "2<4x" } | ${ "4x>20" }
16+ ${ "-3 < 2x+5 < 17" } | ${ "-3<2x+5" } | ${ "2x+5 < 17" }
17+ ${ "-3 = 6x = -3" } | ${ "-3 = 6x" } | ${ "6x = -3" }
18+ ${ "a≥b≥c " } | ${ "a≥b" } | ${ "b≥c" }
19+ ${ "a+2≥b-10≥c-100 " } | ${ "a+2≥b-10" } | ${ "b-10≥c-100" }
20+ ${ "a≠b≠c " } | ${ "a≠b" } | ${ "b≠c" }
2121 ` (
2222 "$compoundInequality => $leftPart, $rightPart" ,
2323 ( { compoundInequality, leftPart, rightPart } ) => {
24- const equation = atm . convert ( lta . convert ( compoundInequality ) ) ;
25- const broken = splitInequality ( equation ) ;
24+ const inequality = atm . convert ( lta . convert ( compoundInequality ) ) ;
25+ const broken = splitInequality ( inequality ) ;
2626
27- const leftPartExpression = atm . convert ( lta . convert ( leftPart ) ) ;
28- const rightPartExpression = atm . convert ( lta . convert ( rightPart ) ) ;
27+ const leftSide = atm . convert ( lta . convert ( leftPart ) ) ;
28+ const rightSide = atm . convert ( lta . convert ( rightPart ) ) ;
2929
30- expect ( broken . left ) . toEqual ( leftPartExpression ) ;
31- expect ( broken . right ) . toEqual ( rightPartExpression ) ;
30+ expect ( broken . left ) . toEqual ( leftSide ) ;
31+ expect ( broken . right ) . toEqual ( rightSide ) ;
3232 }
3333 ) ;
3434} ) ;
0 commit comments