Skip to content

Commit 974c44d

Browse files
committed
Update tests cases with negative numbers.
1 parent 02fcc1a commit 974c44d

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ test(`should return true for very small denominator proper fraction`, () => {
2323
expect(isProperFraction(1, 1000000)).toEqual(true);
2424
});
2525

26+
test(`should return false for negative denominator improper fraction`, () => {
27+
expect(isProperFraction(2, -9)).toEqual(true);
28+
});
29+
30+
2631
// Improper fractions
2732
test(`should return false for very small denominator proper fraction`, () => {
2833
expect(isProperFraction(1.2, 1.1)).toEqual(false);
@@ -48,10 +53,6 @@ test(`should return false for both negative improper fraction`, () => {
4853
expect(isProperFraction(-4, -4)).toEqual(false);
4954
});
5055

51-
test(`should return false for negative denominator improper fraction`, () => {
52-
expect(isProperFraction(2, -9)).toEqual(false);
53-
});
54-
5556
test(`should return true for negative numerator proper fraction`, () => {
5657
expect(isProperFraction(-9, 1)).toEqual(false);
5758
});

0 commit comments

Comments
 (0)