Skip to content

West-Midlands | 26-ITP-May | Maryam Janjua | Sprint 3 | Implement and Rewrite Tests - #1603

Open
maryam-devio wants to merge 2 commits into
CodeYourFuture:mainfrom
maryam-devio:coursework/sprint-3-implement-and-rewrite
Open

West-Midlands | 26-ITP-May | Maryam Janjua | Sprint 3 | Implement and Rewrite Tests#1603
maryam-devio wants to merge 2 commits into
CodeYourFuture:mainfrom
maryam-devio:coursework/sprint-3-implement-and-rewrite

Conversation

@maryam-devio

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

I have implement all the tasks according to the requirements, and test all the changes made.

@maryam-devio maryam-devio 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. Module-Structuring-And-Testing-Data The name of the module. labels Aug 5, 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 Aug 5, 2026
@github-actions

This comment has been minimized.

2 similar comments
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@maryam-devio maryam-devio changed the title West-Midlands | 26-ITP-May | Maryam Janjua | Sprint 3 implement and rewrite tests West-Midlands | 26-ITP-May | Maryam Janjua | Sprint 3 | Implement and Rewrite Tests Aug 5, 2026
@maryam-devio maryam-devio added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 10, 2026
Comment on lines +15 to +20
if(numerator < denominator){
return true;
}
else{
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.

What are the expected return value of these function calls?

  isProperFraction(-1, 0)
  isProperFraction(-1, -5);
 isProperFraction(-1, 5);

On what authoritative source do you base your definition of a proper fraction on?

Comment on lines +38 to +42
const rank = Number(card.slice(0,-1));
const suit = card.slice(-1);
if(rank >= 2 && rank <=10 && ["♠","♥", "♦", "♣"].includes(suit)){
return rank;
}

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.

In JavaScript, strings that represent valid numeric literals in the language can be safely converted to equivalent numbers. For examples, "0x02", "2.1", or "0002".

Does your function return the value you expected from each of the following function calls?

getCardValue("0x02♠");
getCardValue("2.1♠");
getCardValue("0002♠");

expect(getAngleType(181)).toEqual("Reflex angle");
});
// Case 6: Invalid angles
test("should return 'Invalid angle' for invalid angles", () => {

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.

It may not be clear what values are consider "invalid angles".
Can you revise the test description to make it more informative?

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.

Based on the test descriptions, it is unclear what value these function calls should return:

 // It fits three of the test descriptions and they are giving contradicting info
isProperFraction(0, 0); 

// No info about negative numbers
isProperFraction(-1, 2);
isProperFraction(1, -2); 
isProperFraction(-1, -2); 

isProperFraction(-2, 1);
isProperFraction(2, -1); 
isProperFraction(-2, -1); 

@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 Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Structuring-And-Testing-Data The name of the module. Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 3 Assigned during Sprint 3 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants