@@ -11,13 +11,18 @@ test(`should return true when the absolute value of the numerator is less than t
1111 expect ( isProperFraction ( 1 , - 3 ) ) . toEqual ( true ) ;
1212 expect ( isProperFraction ( 3.5 , 4 ) ) . toEqual ( true ) ;
1313 expect ( isProperFraction ( - 99 , - 100 ) ) . toEqual ( true ) ;
14- expect ( isProperFraction ( 0 , - 5 ) ) . toEqual ( true ) ;
15- expect ( isProperFraction ( 0 , 56 ) ) . toEqual ( true ) ;
1614 expect ( isProperFraction ( 8 , 12.5 ) ) . toEqual ( true ) ;
1715 expect ( isProperFraction ( - 6 , 12 ) ) . toEqual ( true ) ;
1816 expect ( isProperFraction ( 0.03 , 0.1 ) ) . toEqual ( true ) ;
1917} ) ;
2018
19+ test ( `should return true when numerator is equal to 0 and denominator is either positive or negative` , ( ) => {
20+ expect ( isProperFraction ( 0 , - 5 ) ) . toEqual ( true ) ;
21+ expect ( isProperFraction ( 0 , 56 ) ) . toEqual ( true ) ;
22+ expect ( isProperFraction ( 0 , 0.1 ) ) . toEqual ( true ) ;
23+ expect ( isProperFraction ( 0 , - 8.9 ) ) . toEqual ( true ) ;
24+ } ) ;
25+
2126test ( `should return false when the denominator is equal to zero` , ( ) => {
2227 expect ( isProperFraction ( - 1 , 0 ) ) . toEqual ( false ) ;
2328 expect ( isProperFraction ( 0 , 0 ) ) . toEqual ( false ) ;
0 commit comments