Skip to content

Comments

London | 26-ITP-JAN | Abdul Moiz | Sprint 1 | Data Groups#947

Open
A-Moiz wants to merge 7 commits intoCodeYourFuture:mainfrom
A-Moiz:sprint-one
Open

London | 26-ITP-JAN | Abdul Moiz | Sprint 1 | Data Groups#947
A-Moiz wants to merge 7 commits intoCodeYourFuture:mainfrom
A-Moiz:sprint-one

Conversation

@A-Moiz
Copy link

@A-Moiz A-Moiz commented Jan 31, 2026

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

Completed the exercises in each directory on Sprint 1

Questions

N/A

@A-Moiz A-Moiz added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jan 31, 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 Jan 31, 2026
@github-actions

This comment has been minimized.

@A-Moiz A-Moiz changed the title London | 26-ITP-JAN | Abdul Moiz | Data Groups | Sprint 1 London | 26-ITP-JAN | Abdul Moiz | Sprint 1 Jan 31, 2026
@github-actions

This comment has been minimized.

@A-Moiz A-Moiz changed the title London | 26-ITP-JAN | Abdul Moiz | Sprint 1 London | 26-ITP-JAN | Abdul Moiz | Sprint 1 | Data Groups Jan 31, 2026
@A-Moiz A-Moiz added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 8, 2026
Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

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

Code is very solid. I only have a few suggestions.

Comment on lines 20 to 22
// Given an array with no duplicates
// When passed to the dedupe function
// Then it should return a copy of the original array
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you also implement a test that checks if the function returns a copy of the original array?

Copy link
Author

Choose a reason for hiding this comment

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

Hi, that is already one of the test cases. On line 31:

{ input: ["apple", "banana", 1, 10], expected: ["apple", "banana", 1, 10] },

If you meant something else can you explain again please? Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

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

This check does not check whether "the function returns a copy of the original array". It only checks if the returned value and expected have the same elements.

  expect(dedupe(input)).toEqual(expected));

@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 Feb 18, 2026
@A-Moiz A-Moiz 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 Feb 21, 2026
Comment on lines 37 to 43
test(`Should return the correct sum of values`, () => {
expect(sum(["apple", "banana", 1, 10])).toEqual(11);
expect(sum([1, -1, -100])).toEqual(-100);
expect(sum([-10, -20, -3, -4])).toEqual(-37);
expect(sum([1.5, 10.5, 0.5])).toBeCloseTo(12.5);
expect(sum(["apple", "banana", "cherry"])).toEqual(-Infinity);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

The description, “Should return the correct sum of values,” is quite broad. If any of the checks fail, it doesn’t clearly indicate why the function failed, making it harder for the tester to understand the specific issue.

@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 Feb 21, 2026
@A-Moiz A-Moiz 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 Feb 21, 2026
@cjyuan
Copy link
Contributor

cjyuan commented Feb 21, 2026

Changes look good. Well done!

@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. labels Feb 21, 2026
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants