Repository navigation
London | 26-ITP-Sept | Fung Nin Lee | Sprint 2 | Data Group - #1526
leerogerfn wants to merge 9 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
| "+", | ||
| " " |
There was a problem hiding this comment.
What does the second + become for an input like name=Ana+Maria+Garcia?
To "like" or "dislike" this comment, please follow this link
| const value = decodeURIComponent(pair.slice(pair.indexOf("=") + 1)).replace( | ||
| "+", | ||
| " " |
There was a problem hiding this comment.
How should an encoded literal plus such as %2B differ from a + used to represent a space? Trace how the value is decoded and then replaced here.
To "like" or "dislike" this comment, please follow this link
| expect(() => tally().toThrow("tally requires an array")); | ||
| }); | ||
|
|
||
| test("throw error for 10", () => { | ||
| expect(() => tally(10).toThrow("tally requires an array")); | ||
| }); | ||
|
|
||
| test("throw error for ''", () => { | ||
| expect(() => tally().toThrow("tally requires an array")); |
There was a problem hiding this comment.
Where is .toThrow(...) invoked in these expectations, and does Jest run an assertion? The same pattern appears in all three invalid-input tests.
To "like" or "dislike" this comment, please follow this link
| if (!pair.includes("=") && pair.length > 0) { | ||
| queryParams[pair] = ""; | ||
| continue; |
There was a problem hiding this comment.
When a bare key such as %24half reaches this branch, is it decoded the same way as a key before =?
To "like" or "dislike" this comment, please follow this link
| return queryParams; | ||
| } | ||
|
|
||
| console.log(parseQueryString("full+name=John+Doe")); |
There was a problem hiding this comment.
What output appears when another module imports this parser?
To "like" or "dislike" this comment, please follow this link
| //The function intent to return houseNumber. However, console.log should locate the key | ||
| //instead of index. function will return error before fix. |
There was a problem hiding this comment.
When the original address[0] expression runs, does it throw an error or produce a value?
To "like" or "dislike" this comment, please follow this link
| @@ -1,4 +1,5 @@ | |||
| // Predict and explain first... | |||
| // Ingredients will return the whole recipe before fix. | |||
There was a problem hiding this comment.
What does JavaScript render for ${recipe} when recipe is an object?
To "like" or "dislike" this comment, please follow this link
|
The CYF AI review has left comments. It will only review a PR one time. When you have addressed these comments, please request review again and a volunteer will take a look. |
Learners, PR Template
Self checklist
Task code
CYF-1083
Changelist
completed exercise of Data Group Sprint-2
Questions
The PR required us do not upload the files of jest (package.json). When I create the push request. I need to delete those file. But when volunteer request us to made some changes on my work. I have to install the jest again. Do there have some ways to avoid me repeating such steps? Thank you.