Skip to content

London | 26-ITP-May | Yonatan Teklemariam | Sprint 3 | Implement and Rewrite Tests#1381

Closed
Yonatanteklemariam wants to merge 12 commits into
CodeYourFuture:mainfrom
Yonatanteklemariam:coursework/Sprint-3
Closed

London | 26-ITP-May | Yonatan Teklemariam | Sprint 3 | Implement and Rewrite Tests#1381
Yonatanteklemariam wants to merge 12 commits into
CodeYourFuture:mainfrom
Yonatanteklemariam:coursework/Sprint-3

Conversation

@Yonatanteklemariam

@Yonatanteklemariam Yonatanteklemariam commented Jun 22, 2026

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

Defined a new function based on the instruction and wrote tests to verify the output matches the expected target output.

@Yonatanteklemariam Yonatanteklemariam added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Complete Volunteer to add when work is complete and all review comments have been addressed. labels Jun 22, 2026
@Yonatanteklemariam Yonatanteklemariam added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jun 27, 2026

@cjyuan cjyuan left a comment

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.

Code looks good.

Can you revert the changes made in the 2-practice-tdd folder? I think they belong to a separate PR.

Comment thread Sprint-3/1-implement-and-rewrite-tests/implement/2-is-proper-fraction.js Outdated
@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 Jun 27, 2026
@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@Yonatanteklemariam

Copy link
Copy Markdown
Author

Code looks good.

Can you revert the changes made in the 2-practice-tdd folder? I think they belong to a separate PR.

yes, I've removed the tdd folder from the changed files and fixed it.

Remove check for zero numerator in isProperFraction function.
@Yonatanteklemariam Yonatanteklemariam 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 Jun 28, 2026

@cjyuan cjyuan left a comment

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.

Have you rerun the test scripts after you made changes? It's a good practice to run the test scripts before making a commit or pushing the commits to GitHub.

Comment on lines +17 to +19
if (Number.isNaN(numerator) || Number.isNaN(denominator)) {
return false;
}

@cjyuan cjyuan Jun 28, 2026

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.

Note: A stronger check might be !Number.isFinite() (or !Number.isInteger() if you only allow integer numerator and denominator).

No change needed.

@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 Jun 28, 2026
@Yonatanteklemariam Yonatanteklemariam 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 Jun 29, 2026
@cjyuan

cjyuan commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

I don't see any new commits on this branch. Have you made any change to address this comment: #1381 (review) ?

@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 Jun 29, 2026
Added checks for finite and integer values of numerator and denominator.
@Yonatanteklemariam Yonatanteklemariam 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 Jul 3, 2026
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

The changed files in this PR don't match what is expected for this task.

Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints.

Please review the changed files tab at the top of the page, we are only expecting changes in this directory: ^Sprint-3/4-stretch/

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

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

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

The changed files in this PR don't match what is expected for this task.

Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints.

Please review the changed files tab at the top of the page, we are only expecting changes in this directory: ^Sprint-3/4-stretch/

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@Yonatanteklemariam Yonatanteklemariam added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 3, 2026
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

The changed files in this PR don't match what is expected for this task.

Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints.

Please review the changed files tab at the top of the page, we are only expecting changes in this directory: ^Sprint-3/4-stretch/

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 3, 2026
@Yonatanteklemariam Yonatanteklemariam added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 3, 2026
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

The changed files in this PR don't match what is expected for this task.

Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints.

Please review the changed files tab at the top of the page, we are only expecting changes in this directory: ^Sprint-3/4-stretch/

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 3, 2026
@Yonatanteklemariam Yonatanteklemariam changed the title London | 26-ITP-May | Yonatan Teklemariam | Sprint 3 | Implement and re-write tests London | 26-ITP-May | Yonatan Teklemariam | Sprint 3 | Implement and Rewrite Tests Jul 3, 2026
@Yonatanteklemariam Yonatanteklemariam added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 3, 2026
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

The changed files in this PR don't match what is expected for this task.

Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints.

Please review the changed files tab at the top of the page, we are only expecting changes in this directory: ^Sprint-3/4-stretch/

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

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

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

The changed files in this PR don't match what is expected for this task.

Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints.

Please review the changed files tab at the top of the page, we are only expecting changes in this directory: ^Sprint-3/4-stretch/

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

1 similar comment
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

The changed files in this PR don't match what is expected for this task.

Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints.

Please review the changed files tab at the top of the page, we are only expecting changes in this directory: ^Sprint-3/4-stretch/

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@cjyuan cjyuan left a comment

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 see how your implementation can pass your tests. That's why I asked if you had reran your tests after you made changes to make sure everything works as expected.

Comment on lines +14 to +19
if (!Number.isFinite(numerator) || !Number.isFinite(denominator)) {
return false;
}
if (!Number.isInteger(numerator) || !Number.isInteger(denominator)) {
return 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.

If a number is not finite, then the number is also not an integer. One of these checks is redundant.

@cjyuan cjyuan added the Reviewed Volunteer to add when completing a review with trainee action still to take. label Jul 3, 2026
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

The changed files in this PR don't match what is expected for this task.

Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints.

Please review the changed files tab at the top of the page, we are only expecting changes in this directory: ^Sprint-3/4-stretch/

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@cjyuan

cjyuan commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

To pass the validation bot check, you need to rename this branch to the name specified in the issue (backlog): #6

Refactor isProperFraction to validate integers instead of finite numbers.
Fix syntax error in isProperFraction function.
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