Skip to content

Commit 1af10d6

Browse files
Fix test case for proper fraction
1 parent 77ebe17 commit 1af10d6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@
33
const isProperFraction = require("../implement/2-is-proper-fraction");
44

55
// Special case: numerator is zero
6-
test(`should return false when denominator is zero`, () => {
7-
expect(isProperFraction(1, 0)).toEqual(false);
6+
test(`should return true when numerator is zero`, () => {
7+
expect(isProperFraction(0, 1)).toEqual(true);
88
});
99

10-
test(`should return false when denominator is zero`, () => {
10+
test(`should return true when denominator is bigger then numerator => {
1111
expect(isProperFraction(1, 2)).toEqual(true);
1212
});
1313
14-
test(`should return false when denominator is zero`, () => {
14+
test(`should return false when denominator is equal to numerator`, () => {
1515
expect(isProperFraction(2, 2)).toEqual(false);
1616
});
1717
18-
test(`should return false when denominator is zero`, () => {
18+
test(`should return false when denominator is smaller than numerator`, () => {
1919
expect(isProperFraction(2, 1)).toEqual(false);
2020
});
2121
22-
test(`should return false when denominator is zero`, () => {
22+
test(`should return false when denominator and numerator are both zero`, () => {
2323
expect(isProperFraction(0, 0)).toEqual(false);
2424
});
2525
2626
test(`should return false when denominator is zero`, () => {
27-
expect(isProperFraction(0, 1)).toEqual(true);
27+
expect(isProperFraction(1, 0)).toEqual(false);
2828
});

0 commit comments

Comments
 (0)