Skip to content

Commit 533ec51

Browse files
committed
Change test cases with negative numbers to return false.
1 parent 72cf361 commit 533ec51

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

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

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,6 @@ test(`should return true for 0 numerator proper fraction`, () => {
1919
expect(isProperFraction(0, 5)).toEqual(true);
2020
});
2121

22-
test(`should return true for negative numerator proper fraction`, () => {
23-
expect(isProperFraction(-9, 1)).toEqual(true);
24-
});
25-
26-
test(`should return true for negative proper fraction`, () => {
27-
expect(isProperFraction(-7, -3)).toEqual(true);
28-
});
29-
3022
test(`should return true for very small denominator proper fraction`, () => {
3123
expect(isProperFraction(1, 1000000)).toEqual(true);
3224
});
@@ -59,3 +51,15 @@ test(`should return false for both negative improper fraction`, () => {
5951
test(`should return false for negative denominator improper fraction`, () => {
6052
expect(isProperFraction(2, -9)).toEqual(false);
6153
});
54+
55+
test(`should return true for negative numerator proper fraction`, () => {
56+
expect(isProperFraction(-9, 1)).toEqual(false);
57+
});
58+
59+
test(`should return true for negative proper fraction`, () => {
60+
expect(isProperFraction(-7, -3)).toEqual(false);
61+
});
62+
63+
test(`should return true for negative numerator proper fraction`, () => {
64+
expect(isProperFraction(-9, 1)).toEqual(false);
65+
});

0 commit comments

Comments
 (0)