@@ -7,7 +7,30 @@ test("should return true for a proper fraction", () => {
77} ) ;
88
99// Case 2: Identify Improper Fractions:
10+ test ( "should return false for an improper fraction" , ( ) => {
11+ expect ( isProperFraction ( 5 , 2 ) ) . toEqual ( false ) ;
12+ } ) ;
1013
1114// Case 3: Identify Negative Fractions:
12-
15+ test ( "should return true for a negative proper fraction" , ( ) => {
16+ expect ( isProperFraction ( - 4 , 7 ) ) . toEqual ( true ) ;
17+ } ) ;
1318// Case 4: Identify Equal Numerator and Denominator:
19+ test ( "should return false when numerator equals denominator" , ( ) => {
20+ expect ( isProperFraction ( 3 , 3 ) ) . toEqual ( false ) ;
21+ } ) ;
22+
23+ // Case 5: Zero Numerator:
24+ test ( "should return true for zero numerator" , ( ) => {
25+ expect ( isProperFraction ( 0 , 5 ) ) . toEqual ( true ) ;
26+ } ) ;
27+
28+ // Case 6: Zero Denominator:
29+ test ( "should return false for zero denominator" , ( ) => {
30+ expect ( isProperFraction ( 4 , 0 ) ) . toEqual ( false ) ;
31+ } ) ;
32+
33+ // Case 7: Negative Denominator:
34+ test ( "should return true for negative denominator" , ( ) => {
35+ expect ( isProperFraction ( 3 , - 5 ) ) . toEqual ( true ) ;
36+ } ) ;
0 commit comments