Skip to content

Glasgow | 26-ITP-Jan| Martin McLean |Sprint 3| implement and rewrite tests coursework#1019

Open
mjm-git185 wants to merge 6 commits intoCodeYourFuture:mainfrom
mjm-git185:Sprint-3
Open

Glasgow | 26-ITP-Jan| Martin McLean |Sprint 3| implement and rewrite tests coursework#1019
mjm-git185 wants to merge 6 commits intoCodeYourFuture:mainfrom
mjm-git185:Sprint-3

Conversation

@mjm-git185
Copy link

@mjm-git185 mjm-git185 commented Feb 22, 2026

Changelist

  • 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

my coursework

@mjm-git185 mjm-git185 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 22, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 22, 2026
@github-actions

This comment has been minimized.

@mjm-git185 mjm-git185 changed the title Glasgow | 26-ITP-Jan| Martin McLean | Sprint | implement and rewrite tests coursework Glasgow | 26-ITP-Jan| Martin McLean | Sprint 3 | implement and rewrite tests coursework Feb 22, 2026
@github-actions

This comment has been minimized.

@mjm-git185 mjm-git185 changed the title Glasgow | 26-ITP-Jan| Martin McLean | Sprint 3 | implement and rewrite tests coursework Glasgow | 26-ITP-Jan| Martin McLean |Sprint 3| implement and rewrite tests coursework Feb 22, 2026
@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@mjm-git185 mjm-git185 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 22, 2026
@LonMcGregor LonMcGregor added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Mar 2, 2026
Copy link

@LonMcGregor LonMcGregor left a comment

Choose a reason for hiding this comment

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

Good work on these tasks, just a couple of things to take another look at

);
}

assertEquals(getAngleType(320), "Acute angle");

Choose a reason for hiding this comment

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

Are you sure this test case has the correct expected value?


function isProperFraction(numerator, denominator) {
// TODO: Implement this function
if (numerator >= denominator) {

Choose a reason for hiding this comment

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

Think about the clean code examples we discussed a while ago - is there a way you could simplify this function further?

@LonMcGregor LonMcGregor 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. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Mar 2, 2026
@mjm-git185 mjm-git185 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 2, 2026
Copy link

@LonMcGregor LonMcGregor left a comment

Choose a reason for hiding this comment

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

Good changes. In the isProperFraction function - you have made the branching a bit simpler, but you could probably take it a bit further. (hint: Think about how you are returning values.)

@LonMcGregor LonMcGregor removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 3, 2026
@mjm-git185 mjm-git185 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 3, 2026
Copy link

@LonMcGregor LonMcGregor left a comment

Choose a reason for hiding this comment

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

I think in our call we got this even more refined - did you submit your most recent commit?

@LonMcGregor LonMcGregor removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 4, 2026
@mjm-git185 mjm-git185 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 4, 2026
Copy link

@LonMcGregor LonMcGregor left a comment

Choose a reason for hiding this comment

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

The angle and the card tasks are complete now, and good work adding extra test cases.

I think you still need to make some changes to the fractions task, I've left some comments there.

});
test(`Should return the correct answer for negative numerators (numerator < denominator)`,()=>{
expect(isProperFraction(-1,2)).toEqual(true)
expect(isProperFraction(-100,2)).toEqual(true)

Choose a reason for hiding this comment

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

Are you sure -100/2 is a valid proper fraction?


function isProperFraction(numerator, denominator) {
// TODO: Implement this function
numerator = Math.sign(numerator) * Math.abs(numerator);

Choose a reason for hiding this comment

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

Good idea to use Math.abs, though I am not sure you need Math.sign here. There might also be an issue in a test case that means this implementation isn't being fully tested.

@LonMcGregor LonMcGregor removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 4, 2026
@mjm-git185 mjm-git185 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 4, 2026
Copy link

@LonMcGregor LonMcGregor left a comment

Choose a reason for hiding this comment

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

I think this looks good now

@LonMcGregor LonMcGregor added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Reviewed Volunteer to add when completing a review with trainee action still to take. labels Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants