Skip to content

Commit 68f5551

Browse files
committed
Identified Improper, Negative and equal fractions.
1 parent 7a5fe08 commit 68f5551

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Sprint-3/2-mandatory-rewrite/2-is-proper-fraction.test.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ test("should return true for a proper fraction", () => {
66

77
// Case 2: Identify Improper Fractions:
88

9+
const improperFraction = isProperFraction(5, 2);
10+
assertEquals(improperFraction, false); // improper fraction is the fraction where the numerator is greater than or equal to the denominator.
11+
912
// Case 3: Identify Negative Fractions:
1013

14+
const negativeFraction = isProperFraction(-4, 7);
15+
assertEquals(negativeFraction, true); // negative fraction is the fraction where the absolute value of the numerator is less than the denominator.
16+
1117
// Case 4: Identify Equal Numerator and Denominator:
18+
19+
const equalFraction = isProperFraction(3, 3);
20+
assertEquals(equalFraction, false); // equal fraction is the fraction where the numerator is equal to the denominator.

0 commit comments

Comments
 (0)