@@ -9,30 +9,17 @@ test(`should return false when denominator is zero`, () => {
99 expect ( isProperFraction ( 1 , 0 ) ) . toEqual ( false ) ;
1010} ) ;
1111
12- test ( `should return true when (numerator < denominator)` , ( ) => {
12+ test ( `should return true when abs (numerator) < abs( denominator)` , ( ) => {
1313 expect ( isProperFraction ( 0 , 1 ) ) . toEqual ( true ) ;
14- } )
15-
16- test ( `should return true when (numerator < denominator)` , ( ) => {
17- expect ( isProperFraction ( - 6 , - 3 ) ) . toEqual ( true ) ;
18- } )
19-
20- test ( `should return true when (numerator < denominator)` , ( ) => {
14+ expect ( isProperFraction ( - 3 , - 6 ) ) . toEqual ( true ) ;
2115 expect ( isProperFraction ( 1 , 2 ) ) . toEqual ( true ) ;
2216} )
2317
24- test ( `should return false when (numerator > denominator)` , ( ) => {
18+ test ( `should return false when abs (numerator) > abs( denominator)` , ( ) => {
2519 expect ( isProperFraction ( 2 , 1 ) ) . toEqual ( false ) ;
20+ expect ( isProperFraction ( - 2 , - 1 ) ) . toEqual ( false ) ;
2621} )
2722
2823test ( `should return false when (numerator == denominator)` , ( ) => {
2924 expect ( isProperFraction ( 0 , 0 ) ) . toEqual ( false ) ;
30- } )
31-
32- test ( `should return false when (numerator > denominator)` , ( ) => {
33- expect ( isProperFraction ( - 1 , - 2 ) ) . toEqual ( false ) ;
34- } )
35-
36- test ( `should return false when (numerator > denominator)` , ( ) => {
37- expect ( isProperFraction ( 0 , - 1 ) ) . toEqual ( false ) ;
3825} )
0 commit comments