Skip to content

London | 26-ITP-May | Zadri Abdule | Sprint 3 | Implement & rewrite tests#1329

Open
Zadri415 wants to merge 10 commits into
CodeYourFuture:mainfrom
Zadri415:sprint-3-rewrite-tests
Open

London | 26-ITP-May | Zadri Abdule | Sprint 3 | Implement & rewrite tests#1329
Zadri415 wants to merge 10 commits into
CodeYourFuture:mainfrom
Zadri415:sprint-3-rewrite-tests

Conversation

@Zadri415

@Zadri415 Zadri415 commented Jun 2, 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

Added Jest tests for Sprint-3 implement and rewrite (exercises 1–3)

@Zadri415 Zadri415 added 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. 📅 Sprint 3 Assigned during Sprint 3 of this module labels Jun 2, 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.

Very solid function implementation and tests.

Comment thread Sprint-3/1-implement-and-rewrite-tests/implement/3-get-card-value.js Outdated
expect(isProperFraction(0, -100)).toEqual(true);
});

test(`should return true when absolute value of numerator is less than absolute value of denominator`, () => {

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: Using pseudocode and notations like abs(...) or | ... | is a common and widely accepted practice for describing conditions in a concise manner.

@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 5, 2026
@Zadri415 Zadri415 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jun 12, 2026
// execute the code to ensure all tests pass.

const validSuits = ["♠", "♣", "♥", "♦"];
const validRanks = ["2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A"];

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's the purpose of preparing validRanks? Could using it simplify the solution?

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.

To check if rank is valid, instead of comparing it to each value one by one.

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.

Sounds good. Why not implement what you described? Otherwise, it is best practice to remove all unused variables to keep the code clean.

@cjyuan cjyuan removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jun 12, 2026
@Zadri415 Zadri415 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jun 26, 2026
@cjyuan

cjyuan commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Changes look good.

@cjyuan cjyuan added Complete Volunteer to add when work is complete and all review comments have been addressed. 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. labels Jun 27, 2026
@Zadri415

Copy link
Copy Markdown
Author

Thank you.

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. Module-Structuring-And-Testing-Data The name of the module. 📅 Sprint 3 Assigned during Sprint 3 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants