Skip to content

Glasgow | Mansoor Munawar | Structuring and Testing Data | Sprint 3 #662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

MansoorM11
Copy link

Learners, PR Template

Self checklist

  • [y ] I have committed my files one by one, on purpose, and for a reason
  • [y ] I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • [y ] I have tested my changes
  • [y ] My changes follow the style guide
  • [y ] My changes meet the requirements of this task

Changelist

Briefly explain your PR.
I have completed the task for sprint 3 which required me to create test using Jest and implement functions to solve the required problems.

Questions

Ask any questions you have for your reviewer.

@MansoorM11 MansoorM11 added the Needs Review Participant to add when requesting review label Jul 16, 2025
@LonMcGregor LonMcGregor added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Jul 17, 2025
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.

Hi Mansoor, good work on this sprint. I've left comments about 2 small issues in two files for you to look at.

if (Math.abs(numerator) < Math.abs(denominator)) return true;
else if (numerator === denominator) return false;
else if (numerator > denominator) return false;
else return false;
}

Choose a reason for hiding this comment

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

Can you see any way you could combine these 3 return false conditions into one line?

// Handle Ace (A):
// Given a card with a rank of "A",
// When the function is called with an Ace,
// Then it should, by default, assume the Ace is worth 11 points, which is a common rule in blackjack.

const aceOfHearts = getCardValue("A♥");
assertEquals(aceOfSpades, 11);

Choose a reason for hiding this comment

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

I think you may have made a typo here that invalidates this test. Which variables are you trying to test for on this line?

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review and removed Needs Review Participant to add when requesting review Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jul 17, 2025
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants