Skip to content

Commit 049c628

Browse files
committed
rewrite: is proper fraction exersice done
1 parent 79156df commit 049c628

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest/1-get-angle-type.test.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,18 @@ test("should identify right angle (90°)", () => {
99
// REPLACE the comments with the tests
1010
// make your test descriptions as clear and readable as possible
1111

12-
// Case 2: Identify Acute Angles:
13-
// When the angle is less than 90 degrees,
14-
// Then the function should return "Acute angle"
1512
test("should identify Acute angle (less than 90°)", () => {
1613
expect(getAngleType(80)).toEqual("Acute angle");
1714
});
1815

19-
// Case 3: Identify Obtuse Angles:
20-
// When the angle is greater than 90 degrees and less than 180 degrees,
21-
// Then the function should return "Obtuse angle"
2216
test("should identify Obtuse angle (greater than 90° and less than 180 )", () => {
2317
expect(getAngleType(100)).toEqual("Obtuse angle");
2418
});
25-
// Case 4: Identify Straight Angles:
26-
// When the angle is exactly 180 degrees,
27-
// Then the function should return "Straight angle"
19+
2820
test("should identify Straight angle (180°)", () => {
2921
expect(getAngleType(180)).toEqual("Straight angle");
3022
});
31-
// Case 5: Identify Reflex Angles:
32-
// When the angle is greater than 180 degrees and less than 360 degrees,
33-
// Then the function should return "Reflex angle"
23+
3424
test("should identify Reflex angle (greater than 180° and less than 360°)", () => {
3525
expect(getAngleType(181)).toEqual("Reflex angle");
3626
});

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,16 @@ test("should return true for a proper fraction", () => {
77
});
88

99
// Case 2: Identify Improper Fractions:
10+
test("should return false for an improper Fractions", () => {
11+
expect(isProperFraction(9, 4)).toEqual(false);
12+
});
1013

1114
// Case 3: Identify Negative Fractions:
15+
test("should return true for a negative Fractions", () => {
16+
expect(isProperFraction(-6, 4)).toEqual(true);
17+
});
1218

1319
// Case 4: Identify Equal Numerator and Denominator:
20+
test("should return false for an equal Fractions", () => {
21+
expect(isProperFraction(7, 7)).toEqual(false);
22+
});

0 commit comments

Comments
 (0)