Skip to content

Commit 4c5ad3a

Browse files
committed
completed the jest test for 2-proper-fraction-test.js
1 parent a0ed029 commit 4c5ad3a

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

‎implement-and-rewrite-tests/rewrite-tests-with-jest/2-is-proper-fraction.test.js‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,17 @@ import { isProperFraction } from "../implement/2-is-proper-fraction.js";
44

55
// Special case: numerator is zero
66
test(`should return false when denominator is zero`, () => {
7-
expect(isProperFraction(1, 0)).toEqual(false);
7+
expect(isProperFraction(1, 0)).toEqual("false");
88
});
9+
10+
test(`should return true when denominator is more than numerator`, () => {
11+
expect(isProperFraction(1, 4)).toEqual("true");
12+
});
13+
14+
test(`should return false when denominator is less than numerator`, () => {
15+
expect(isProperFraction(4, 1)).toEqual("false");
16+
});
17+
18+
test(`should true when denominator and numerator are negative`, () => {
19+
expect(isProperFraction(-5, -2)).toEqual("true");
20+
});

0 commit comments

Comments
 (0)