Skip to content

Commit 014b90e

Browse files
Enhance tests for proper fraction validation
Added test cases for negative improper fractions.
1 parent 1200ba7 commit 014b90e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest/2-is-proper-fraction.test.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,9 @@ test("should return true for a negative proper fraction", () => {
1919
// Case 4: Identify Equal Numerator and Denominator:
2020
test ("should return false when numerator equals denominator", () => {
2121
expect(isProperFraction(3, 3)).toEqual(false);
22-
});
22+
});
23+
24+
// Case 5: Identify Negative Improper Fractions:
25+
test("should return false for a negative improper fraction", () => {
26+
expect(isProperFraction(-4, 4)).toEqual(false);
27+
expect(isProperFraction(10, -3)).toEqual(false);

0 commit comments

Comments
 (0)