Skip to content

Commit 8930945

Browse files
committed
Added Jest tests for isProperFraction for proper, improper, negative, equal numerator/denominator cases
1 parent 92cbdf6 commit 8930945

File tree

3 files changed

+4422
-3
lines changed

3 files changed

+4422
-3
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,16 @@ test("should return true for a proper fraction", () => {
77
});
88

99
// Case 2: Identify Improper Fractions:
10+
test("should return false for Improper fraction", () => {
11+
expect(isProperFraction(5, 2)).toEqual(false);
12+
});
1013

1114
// Case 3: Identify Negative Fractions:
15+
test("should return false for Negative fraction", () => {
16+
expect(isProperFraction(-4, 7)).toEqual(false);
17+
});
1218

1319
// Case 4: Identify Equal Numerator and Denominator:
20+
test("should return false for Equal numerator and denominator", () => {
21+
expect(isProperFraction(3, 3)).toEqual(false);
22+
});

0 commit comments

Comments
 (0)