Sheffield | ITP-Jan-26| Mona_Eltantawy | Sprint 3 | Sprint 3/ implement and testing data#1280
Sheffield | ITP-Jan-26| Mona_Eltantawy | Sprint 3 | Sprint 3/ implement and testing data#1280Mona-Eltantawy wants to merge 9 commits intoCodeYourFuture:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
No new commits on this branch on GitHub yet. |
This comment has been minimized.
This comment has been minimized.
|
You have another PR on the same exercise. You need to close the other one or else this PR won't pass the validation. |
I closed the other one can you recheck please |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
added changes to the test files
| describe("Invalid angle", () => { | ||
| test("should return 'Invalid angle' when (angle <= 0 or angle > 360)", () => { | ||
| expect(getAngleType(0)).toBe("Invalid angle"); | ||
| expect(getAngleType(400)).toBe("Invalid angle"); | ||
| expect(getAngleType(-10)).toBe("Invalid angle"); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
-
360 is also an invalid angle. The test description could include it too.
-
Why not test both boundary cases?
There was a problem hiding this comment.
I added the boundary cases
There was a problem hiding this comment.
You didn't update the test description.
| test("should return false when numerator is negative", () => { | ||
| expect(isProperFraction(-2, 4)).toEqual(false); | ||
| }); | ||
|
|
||
| // negative denominator | ||
| test("should return false when denominator is negative", () => { | ||
| expect(isProperFraction(5, -4)).toEqual(false); | ||
| }); | ||
|
|
||
| // both negative | ||
| test("should return false when both numerator and denominator are negative", () => { | ||
| expect(isProperFraction(-3, -5)).toEqual(false); | ||
| }); |
There was a problem hiding this comment.
Can your function pass all these tests?
We can use pseudo-code and notations like abs(...) or | ... | in the test descriptions to more
concisely describe the conditions (the "when" part).
There was a problem hiding this comment.
I fixed the function to pass all the tests
There was a problem hiding this comment.
This file should contain the tests for getCardValue().
Self checklist