Skip to content

Commit 461d0b6

Browse files
committed
Add unit tests for isProperFraction covering all key scenarios
1 parent a417fa0 commit 461d0b6

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
@@ -5,7 +5,16 @@ test("should return true for a proper fraction", () => {
55
});
66

77
// Case 2: Identify Improper Fractions:
8+
test("should return false for an improper fraction", () => {
9+
expect(isProperFraction(5, 2)).toEqual(false);
10+
});
811

912
// Case 3: Identify Negative Fractions:
13+
test("should return true for a negative proper fraction", () => {
14+
expect(isProperFraction(-4, 7)).toEqual(true);
15+
});
1016

1117
// Case 4: Identify Equal Numerator and Denominator:
18+
test("should return false when numerator equals denominator", () => {
19+
expect(isProperFraction(3, 3)).toEqual(false);
20+
});

0 commit comments

Comments
 (0)