Skip to content

London | 26-ITP-Sep | Abakar Souleyman | Sprint 3 | implement-and-rewrite-tests - #1660

Open
abmhts wants to merge 6 commits into
CodeYourFuture:mainfrom
abmhts:coursework/sprint-3-implement-and-rewrite
Open

abmhts wants to merge 6 commits into
CodeYourFuture:mainfrom
abmhts:coursework/sprint-3-implement-and-rewrite

Conversation

@abmhts

@abmhts abmhts commented Oct 8, 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

Task code

CYF-1059

Changelist

Completed the implementation and rewrote the tests using node:test and jest.

@abmhts abmhts added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 8, 2026
@hackertainment hackertainment added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Oct 9, 2026

@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.

Thank you for your coursework. Please keep it up.

Comment on lines +29 to +32
test("Classifies for angles outside the valid range.", () => {
const invalid = getAngleType(361);
assert.equal(invalid, "Invalid angle");
});

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 two boundary case for angles outside the valid range. Can you think of them? Please add them into this test suite. Thank you.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good coverage of test cases. Well done!

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I don't think this program runs correctly for positives, negatives, and zeros. Can you fix it? Thank you.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The test cases should also include negatives and zeros. Please add them back. Thank you.

Comment on lines +21 to +23
test(`should return false when numerator is (-)`, () => {
expect(isProperFraction(-1, 0)).toEqual(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.

The description does not match the expected output. Which one is correct?

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 test cases covering different combination of positive and negative values. Please add them back. Thank you.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I am not quite sure about the correctness of this program. Please fix the following issues:

  1. formatting (e.g. indentation, brackets, etc)
  2. making if and else if cleaner to read, covering all possible combinations (instead of hardcode specific values)
  3. try to store card.slice(0, -1) into a variable and reuse it (instead of slice it multiple times)

If you find it difficult to approach this problem, try to book a mentored coding session and work this out with a volunteer together.

@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 Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants