Skip to content

London | 26-ITP-May | Raihan Sharif | Sprint 3 | Implement and rewrite#1304

Open
RaihanSharif wants to merge 5 commits into
CodeYourFuture:mainfrom
RaihanSharif:sprint-3-implement-and-rewrite
Open

London | 26-ITP-May | Raihan Sharif | Sprint 3 | Implement and rewrite#1304
RaihanSharif wants to merge 5 commits into
CodeYourFuture:mainfrom
RaihanSharif:sprint-3-implement-and-rewrite

Conversation

@RaihanSharif
Copy link
Copy Markdown

Learners, PR Template

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

Completed as per spec.

@RaihanSharif RaihanSharif added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Structuring-And-Testing-Data The name of the module. labels May 6, 2026
const suit = ["♠", "♥", "♦", "♣"];

const cardValue = card.slice(0, -1);
const cardSuit = card[card.length - 1];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

card,slice(-1) also works.

Comment on lines +37 to 42
test(`should return "Reflex angle" when (180 < angle < 361)`, () => {
// Test various acute angles, including boundary cases
expect(getAngleType(179)).not.toEqual("Reflex angle");
expect(getAngleType(371)).not.toEqual("Reflex angle");
expect(getAngleType(200)).toEqual("Reflex angle");
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • 360 is not a reflex angle.

  • Why not introduce a category to test invalid angles, especially the boundary cases?

Comment on lines +30 to +36
test(`should return true when numerator and denominator both negative and numerator < denominator`, () => {
expect(isProperFraction(-3, -2)).toEqual(true);
});

test(`should return true when numerator is negative and numerator < denominator`, () => {
expect(isProperFraction(-3, 2)).toEqual(true);
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • I don't think your function can pass these tests?

  • You can use pseudo-code and notations like abs(...) or | ... | in the descriptions to more
    concisely describe the conditions (the "when" part).

Comment on lines +38 to +39
assertEquals(isProperFraction(-5, 4), true);
assertEquals(isProperFraction(-4, -5), false);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can your function pass these tests?

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

Labels

Module-Structuring-And-Testing-Data The name of the module. 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