Skip to content

Conversation

TzeMingHo
Copy link

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

For the 3 exercises, I have created assert conditions and tests for each case, as well as some stretch cases.

…wer case to upper case and replace all space with underline
@TzeMingHo TzeMingHo added 📅 Sprint 3 Assigned during Sprint 3 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Sep 23, 2025
@jenny-alexander jenny-alexander self-requested a review October 4, 2025 13:55
@jenny-alexander jenny-alexander 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 4, 2025
Copy link

@jenny-alexander jenny-alexander left a comment

Choose a reason for hiding this comment

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

Good job covering most test cases @TzeMingHo - I left a few comments for you to review.

// complete the rest of the tests and cases
// write one test at a time, and make it pass, build your solution up methodically

function isProperFraction(numerator, denominator) {

Choose a reason for hiding this comment

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

Your isProperFraction works well. However, if you wanted to simplify it even more, you could try:

// this will return either true or false
return (Math.abs(numerator) < Math.abs(denominator));

Choose a reason for hiding this comment

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

What would happen if I run the test with:

  • angle: 'ten'
  • angle: 1000
  • angle: -22
  • angle: null

// Input: numerator = "a", denominator = 2
// target output: false
// Explanation: The function should handle non-numeric inputs gracefully. In this case, we choose to return false.
const invalidInputs = isProperFraction("a", 2);

Choose a reason for hiding this comment

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

👏 Good job making sure that 'unhappy path' is tested.

Choose a reason for hiding this comment

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

When I run your tests, I get this result:
Assertion failed: Expected 1♠ to equal Error: Invalid card rank
Assertion failed: Expected Z♠ to equal Error: Invalid card rank
Assertion failed: Expected to equal Error: Invalid card rank

Can you take a look?

Choose a reason for hiding this comment

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

I tried a few more 'unhappy path' tests:

  • card value of true
  • card value of 22
  • card value of null

I was expecting ('Error: Invalid card rank').

@jenny-alexander jenny-alexander 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 8, 2025

Choose a reason for hiding this comment

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

I think you included this file by mistake.

@TzeMingHo TzeMingHo 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 Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 📅 Sprint 3 Assigned during Sprint 3 of this module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants