|
3 | 3 | const isProperFraction = require("../implement/2-is-proper-fraction"); |
4 | 4 |
|
5 | 5 | // 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); |
8 | 8 | }); |
9 | 9 |
|
10 | | -test(`should return false when denominator is zero`, () => { |
| 10 | +test(`should return true when denominator is bigger then numerator => { |
11 | 11 | expect(isProperFraction(1, 2)).toEqual(true); |
12 | 12 | }); |
13 | 13 |
|
14 | | -test(`should return false when denominator is zero`, () => { |
| 14 | +test(`should return false when denominator is equal to numerator`, () => { |
15 | 15 | expect(isProperFraction(2, 2)).toEqual(false); |
16 | 16 | }); |
17 | 17 |
|
18 | | -test(`should return false when denominator is zero`, () => { |
| 18 | +test(`should return false when denominator is smaller than numerator`, () => { |
19 | 19 | expect(isProperFraction(2, 1)).toEqual(false); |
20 | 20 | }); |
21 | 21 |
|
22 | | -test(`should return false when denominator is zero`, () => { |
| 22 | +test(`should return false when denominator and numerator are both zero`, () => { |
23 | 23 | expect(isProperFraction(0, 0)).toEqual(false); |
24 | 24 | }); |
25 | 25 |
|
26 | 26 | test(`should return false when denominator is zero`, () => { |
27 | | - expect(isProperFraction(0, 1)).toEqual(true); |
| 27 | + expect(isProperFraction(1, 0)).toEqual(false); |
28 | 28 | }); |
0 commit comments