Skip to content

Commit 9c84e3d

Browse files
authored
Add test to handle negative numbers
Added a test case to check for proper fraction with positive numbers.
1 parent 26a0fed commit 9c84e3d

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ test(`should return true when denominator is smaller or equal to the numerator`,
1616
});
1717

1818
test(`should return false when denominator is bigger than the numerator`, () => {
19+
expect(isProperFraction(12, 4)).toEqual(false);
20+
});
21+
22+
test("should return false when the numerator or denominator is not a positive number", () => {
1923
expect(isProperFraction(5, -2)).toEqual(false);
2024
expect(isProperFraction(-1, 0)).toEqual(false);
21-
expect(isProperFraction(12, 4)).toEqual(false);
22-
2325
});
24-
26+

0 commit comments

Comments
 (0)