London | 26-ITP-May | D Dl | Sprint 2 | implement - #1326
Conversation
| expect([]).toEqual({}); | ||
| }); | ||
|
|
||
| test("for multiple country currency returns multiple lookup", () => { |
There was a problem hiding this comment.
For tests please use function createLookup since you are testing the function
There was a problem hiding this comment.
"test("for multiple country currency returns multiple lookup", createLookup () => {" you meant to use it like this .
| // Given a function called tally | ||
| // When passed an array of items | ||
| // Then it should return an object containing the count for each unique item | ||
| test("given an array of items returns an object containing the counter for each item", () => { |
There was a problem hiding this comment.
These tests compare arrays, never call tally
| // When passed to tally | ||
| // Then it should throw an error | ||
| test("tally on an empty array returns an empty object", () => { | ||
| expect(() => tally("string").toThrow("Invalid input!")); |
There was a problem hiding this comment.
Double check the expression, it contains error
There was a problem hiding this comment.
hi Selyafi, i have done all tasks under sprint 2 but this time i use one pr for the three section ( debug,implement and interpret)
| const value = decodeURIComponent(rawValue.replace(/\+/g, " ")); | ||
|
|
||
| // 4. Handle identical keys (stretch goal) | ||
| if (queryParams.hasOwnProperty(key)) { |
There was a problem hiding this comment.
Please check https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwn, a safer alternative and in the description explained why.
|
Your PR couldn't be matched to an assignment in this module. Please check its title is in the correct format, and that you only have one PR per assignment. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
Learners, PR Template
Self checklist
Changelist
sprint2 implement tasks are done