Skip to content

London | 26-ITP-May | Jorvan White | Sprint 3 | Implement and Rewrite Tests - #1601

Open
JorvanW wants to merge 39 commits into
CodeYourFuture:mainfrom
JorvanW:Sprint-3/1-implement-and-rewrite-tests
Open

London | 26-ITP-May | Jorvan White | Sprint 3 | Implement and Rewrite Tests#1601
JorvanW wants to merge 39 commits into
CodeYourFuture:mainfrom
JorvanW:Sprint-3/1-implement-and-rewrite-tests

Conversation

@JorvanW

@JorvanW JorvanW commented Aug 3, 2026

Copy link
Copy Markdown

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

Created Pull Request from Sprint 3 Task and updated for Pull Request

if (denominator === 0) {
return false;
}
if (numerator < denominator && numerator > 0) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This if condition seems not quite right. Why (-2)/(-3) would return false?

});

// Case 6: Invalid angles
test(`should return "Invalid angle" when (angle < 0 || angle > 360)`, () => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides -1 and 361, it should include the two boundary cases as well.

});

test(`should return false when both numerator and denominator are negative`, () => {
expect(isProperFraction(-1, -2)).toEqual(false);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one should expect true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there should be more negative number test cases. Can you think of them?

Comment on lines +26 to +34
// Invalid Cards
// test(`Cards without suits return as Invalid card`, () => {
// expect(getCardValue("10")).toEqual(new Error);
// });
test('Cards without suits return as Invalid card', () => {
expect(() => {
getCardValue("10");
}).toThrow("Invalid card");
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there should be more invalid cases, Can you think of them?

@hackertainment hackertainment left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your functions are well written with clear logic and easy to read. Just need to improve on thinking test cases covering all possible scenarios. Good work, and keep it up :-)

@hackertainment hackertainment added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Aug 7, 2026
@JorvanW JorvanW added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Aug 10, 2026
@hackertainment hackertainment added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Aug 11, 2026
@JorvanW

JorvanW commented Aug 12, 2026

Copy link
Copy Markdown
Author

Hello, is this completed or is there anything else I need to change. Many Thanks.

@hackertainment

Copy link
Copy Markdown
image These three issues need to be fixed further. Thank you.

@JorvanW

JorvanW commented Aug 13, 2026

Copy link
Copy Markdown
Author

I believed I have now managed to fix them.

@JorvanW JorvanW added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants