Skip to content

Commit a36eb22

Browse files
committed
Added test cases with decimal
1 parent fd03be2 commit a36eb22

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,13 @@ test("should return true for negative fraction", () => {
1919
// Case 4: Identify Equal Numerator and Denominator:
2020
test("should return false for Equal Numerator fraction", () => {
2121
expect(isProperFraction(3, 3)).toEqual(false);
22-
});
22+
});
23+
24+
// Improper fractions as decimals
25+
test('1.5 should not be proper (3/2)', () => {
26+
expect(isProperFraction(1.5)).toBe(false);
27+
});
28+
29+
test('2.25 should not be proper (9/4)', () => {
30+
expect(isProperFraction(2.25)).toBe(false);
31+
});

0 commit comments

Comments
 (0)