There was an error while loading. Please reload this page.
1 parent e346b17 commit 163c1d0Copy full SHA for 163c1d0
1 file changed
Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest/2-is-proper-fraction.test.js
@@ -8,3 +8,13 @@ const isProperFraction = require("../implement/2-is-proper-fraction");
8
test(`should return false when denominator is zero`, () => {
9
expect(isProperFraction(1, 0)).toEqual(false);
10
});
11
+
12
+test(`should return false when (numerator >= denominator)`, () => {
13
+ expect(isProperFraction(2, 1)).toEqual(false);
14
+ expect(isProperFraction(2, 2)).toEqual(false);
15
+});
16
17
+test(`should treat numerator and denominator as absolute values when determining proper fractions`, () => {
18
+ expect(isProperFraction(-2, 3)).toEqual(true);
19
+ expect(isProperFraction(-7, 2)).toEqual(false);
20
0 commit comments