Skip to content

Commit 921a30a

Browse files
committed
align angle tests and implementation of function with specification of the task
1 parent e21d0fd commit 921a30a

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ function getAngleType(angle) {
3030
if (angle > 180 && angle < 360) {
3131
return "Reflex angle";
3232
}
33-
if (angle === 360) {
34-
return "Straight angle";
35-
}
3633

3734
return "Invalid angle";
3835
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ test(`should return "Invalid angle" for angles greater than 360°`, () => {
4646
expect(getAngleType(361)).toEqual("Invalid angle");
4747
});
4848

49-
// Largest valid angle(boundary case)
50-
test(`should return "Straight angle" when angle is the maximum valid value (360)`, () => {
51-
expect(getAngleType(360)).toEqual("Straight angle");
49+
50+
test(`should return "Invalid angle" for angles equal to 360°`, () => {
51+
expect(getAngleType(360)).toEqual("Invalid angle");
5252
});
5353
// Smallest valid angle(boundary case)
5454
test(`should return "Acute angle" when angle is the minimum valid value (1)`, () => {

0 commit comments

Comments
 (0)