Skip to content

Commit e9b6a8b

Browse files
committed
last test corrections
1 parent cc6189b commit e9b6a8b

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,12 @@ test("should return false when denominator is negative", () => {
3535
});
3636

3737
test("should return false when both numerator and denominator are negative", () => {
38-
expect(isProperFraction(-4, -5)).toEqual(true);
38+
expect(isProperFraction(-4, -5)).toEqual(false);
3939
});
40+
//If you mean why isProperFraction(-4, -5) is false, look at your first condition:
41+
42+
//if (denominator <= 0) {
43+
//return false;}
44+
//isProperFraction(-4, -5) the denominator is -5.so javascript -5 <= 0 // true
45+
// so Therefore JavaScript immediately does: :return false
46+
// It never gets to; return numerator < denominator;

0 commit comments

Comments
 (0)