Skip to content

Commit 8d09a15

Browse files
committed
added negative number tests for isProperFraction
1 parent f989cbd commit 8d09a15

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@ test("Proper fraction numerator is 0", () => {
1515
assert.equal(isProperFraction(0, 1), true);
1616
});
1717

18+
test("Proper fraction with a negative numerator but positive denominator", () => {
19+
assert.equal(isProperFraction(-2, 3), true);
20+
});
21+
test("Proper fraction with a positive numerator but negative denominator", () => {
22+
assert.equal(isProperFraction(2, -3), true);
23+
});
24+
25+
test("Proper fraction with both a negative numerator and denominator", () => {
26+
assert.equal(isProperFraction(-2, -3), true);
27+
});
28+
1829
test("Improper fraction denominator is 0", () => {
1930
assert.equal(isProperFraction(1, 0), false);
2031
});

0 commit comments

Comments
 (0)