Skip to content

Cape Town | 25-ITP-MAY | Asanda Dunn | Sprint 2 | Data Groups - #1447

Open
asandagwala wants to merge 8 commits into
CodeYourFuture:mainfrom
asandagwala:Sprint2-from-main
Open

asandagwala wants to merge 8 commits into
CodeYourFuture:mainfrom
asandagwala:Sprint2-from-main

Conversation

@asandagwala

@asandagwala asandagwala commented Aug 21, 2026 •

Copy link
Copy Markdown

TASK ID: CYF-1083

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

This PR contains the work done on Sprint 2 of the Data Groups module

@asandagwala asandagwala added 📅 Sprint 2 Assigned during Sprint 2 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Data-Groups The name of the module. labels Aug 21, 2026
@hackertainment hackertainment 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 Aug 21, 2026
@hackertainment

Copy link
Copy Markdown

The programs are generally good. Just test cases do not having enough coverage currently. Try to think of different scenarios when designing test cases. Keep it up. :-)

@hackertainment hackertainment 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 Aug 21, 2026
@asandagwala asandagwala changed the title Cape Town | 25-ITP-May | Asanda Dunn | Sprint 2 | Data Groups Cape Town | 25-ITP-SEP | Asanda Dunn | Sprint 2 | Data Groups Sep 15, 2026
@asandagwala asandagwala added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 15, 2026
@asandagwala asandagwala changed the title Cape Town | 25-ITP-SEP | Asanda Dunn | Sprint 2 | Data Groups Cape Town | 25-ITP-MAY | Asanda Dunn | Sprint 2 | Data Groups Sep 15, 2026

@LonMcGregor LonMcGregor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Did you run the tests before submitting this? I still see some tests marked as "todo"

In addition I have one comment about a task.

Almost there!

Comment thread Sprint-2/debug/address.js
};

// console.log(`${address[2]}`)
console.log(`My house number is ${address[0]}`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This tells me the house number is undefined? Is that right?

@LonMcGregor LonMcGregor removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 22, 2026
Comment thread Sprint-2/debug/address.js
Comment on lines +15 to 16
// console.log(`${address[2]}`)
console.log(`My house number is ${address[0]}`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

address is an object but not array. so it cannot use indexing to get an element. please try again. thank you.

Comment on lines +44 to +46
test("contains returns false when passed an array", () => {
expect(contains([], "a")).toBe(false);
}); No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There should be more test cases within this test suite. Can you think of them and add more? Thank you.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There should be more test cases such as empty array or array with one pair of country-currency code etc. Please add them to increase the testing coverage. thank you.

queryParams[key] = value;
// Ignore empty pairs
if (pair === "") {
continue;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

please use else for the rest of loop rather than continue keyword.

Comment on lines 41 to +46
// Given an invalid input like a string
// When passed to tally
// Then it should throw an error
test("tally throws an error when given a string", () => {
expect(() => tally("hello")).toThrow();
}); No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Besides string, there are other invalid inputs which would be good to add to the test suite as well. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants