Skip to content

Cape Town | 26-ITP-Sept | Leigh Ross | Sprint 2 | Implement and rewrite tests - #1683

Open
leigh-ross wants to merge 13 commits into
CodeYourFuture:mainfrom
leigh-ross:coursework/sprint-2-implement-and-rewrite
Open

leigh-ross wants to merge 13 commits into
CodeYourFuture:mainfrom
leigh-ross:coursework/sprint-2-implement-and-rewrite

Conversation

@leigh-ross

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

Task code

CYF-1059

Changelist

Added 3 functions:

  • getAngleType
  • isProperFraction
  • getCardValue
    Added node tests for each Function.
    Rewrote node tests for jest.

@leigh-ross leigh-ross added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 12, 2026
@Liam310 Liam310 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 12, 2026
Comment thread implement-and-rewrite-tests/implement/2-is-proper-fraction.js Outdated
@Liam310 Liam310 added Reviewed Volunteer to add when completing a review with trainee action still to take. Complete Volunteer to add when work is complete and all review comments have been addressed. 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. and removed 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. Complete Volunteer to add when work is complete and all review comments have been addressed. Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Oct 12, 2026
Comment thread implement-and-rewrite-tests/implement/3-get-card-value.js Outdated
Comment thread implement-and-rewrite-tests/rewrite-tests-with-jest/2-is-proper-fraction.test.js Outdated
Comment thread implement-and-rewrite-tests/rewrite-tests-with-jest/1-get-angle-type.test.js Outdated
Comment thread implement-and-rewrite-tests/rewrite-tests-with-jest/1-get-angle-type.test.js Outdated
@Liam310

Liam310 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

@leigh-ross Hi Leigh! Great work overall on this coursework but I have left a few changes you need to look into. In general, you should always make sure to run your tests before committing - you don't want to be committing work that isn't passing tests!

A quick note on your commits: I really appreciate you committing once per function, I think that is a good practice for using commits to track when some unit of work is complete. The commit messages could use a little bit of improvement for you to consider in the future. I would try to write commit messages by stating what the commit will change if it is merged (I know we don't merge PRs at CYF, but in a workplace you would). Imagine they are following on from the phrase "this commit will...", for example instead of:

Angle type: Function logic works, added test cases, all tests pass

You could say

implement getAngleType function with full test suite

You don't need to make these changes as part of this PR but bear it in mind for future :)

@Liam310 Liam310 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 13, 2026
…dded error for both if conditions do not pass. Added tests in node and jest for the incorrect suit case and error throwing. All tests pass.
@leigh-ross leigh-ross added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 14, 2026
Comment thread implement-and-rewrite-tests/rewrite-tests-with-jest/2-is-proper-fraction.test.js Outdated
@Liam310 Liam310 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. Reviewed Volunteer to add when completing a review with trainee action still to take. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Oct 19, 2026
@leigh-ross leigh-ross added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 20, 2026
Comment on lines +51 to +53
test("-980/100 is not a proper fraction", () => {
expect(isProperFraction(-98, 100)).toBe(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.

I'm afraid I'm still getting a failing test here! Looks like the assertion doesn't match the intention of the test perhaps...

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I think it should be fixed now. My apologies for this back and forth.

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.

don't apologise, that's what code review is for 🙂

@Liam310 Liam310 added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Oct 20, 2026
@Liam310 Liam310 added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Oct 20, 2026
@Liam310

Liam310 commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

@leigh-ross Excellent! All done 👌

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