File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -15,9 +15,15 @@ test("should return false when numerator is equal to or greater than denominator
1515 expect ( isProperFraction ( 10 , 3 ) ) . toEqual ( false ) ;
1616} ) ;
1717
18- test ( "should return false when numerator or denominator is negative" , ( ) => {
19- expect ( isProperFraction ( - 1 , 2 ) ) . toEqual ( false ) ;
20- expect ( isProperFraction ( 1 , - 2 ) ) . toEqual ( false ) ;
18+ test ( "should return true for proper fractions with negative numbers" , ( ) => {
19+ expect ( isProperFraction ( - 1 , 2 ) ) . toEqual ( true ) ;
20+ expect ( isProperFraction ( 1 , - 2 ) ) . toEqual ( true ) ;
21+ expect ( isProperFraction ( - 4 , - 5 ) ) . toEqual ( true ) ;
22+ } ) ;
23+
24+ test ( "shold return false for improper fractions with negative numbers" , ( ) => {
25+ expect ( isProperFraction ( - 9 , 5 ) ) . toEqual ( false ) ;
26+ expect ( isProperFraction ( 4 , - 3 ) ) . toEqual ( false ) ;
2127} ) ;
2228
2329// Special case: numerator is zero
You can’t perform that action at this time.
0 commit comments