Sheffield | 26-Jan-ITP | Daniel Aderibigbe | Sprint 1 | Coursework/sprint 1#986
Sheffield | 26-Jan-ITP | Daniel Aderibigbe | Sprint 1 | Coursework/sprint 1#986Dan2Clouted wants to merge 10 commits intoCodeYourFuture:mainfrom
Conversation
| test("given an array containing non-number values, it ignores them and returns the sum of the numerical elements", () => { | ||
| const input = ["hello", "world"]; | ||
| const expectedOutput = 0; | ||
| expect(sum(input)).toBe(expectedOutput); | ||
| }); | ||
|
|
||
| // Given an array with only non-number values | ||
| // When passed to the sum function | ||
| // Then it should return the least surprising value given how it behaves for all other inputs | ||
| test("given an array with only non-number values, it returns the least surprising value", () => { | ||
| const input = ["hello", "world"]; | ||
| const expectedOutput = 0; | ||
| expect(sum(input)).toBe(expectedOutput); | ||
| }); |
There was a problem hiding this comment.
I think this exercise also involves "reading data from files". If you are up to the challenge, can you write a script that can read the numbers from a file and then output their sums?
|
Thanks for the detailed feedback — really helpful. I’ve gone through all the comments and made the following updates:
|
cjyuan
left a comment
There was a problem hiding this comment.
Changes look good, but you introduced a bug into one of the files. Can you fix it?
|
The bug issues has been resolved. |
|
I can still see the bug. If you run jest test, you should notice some failed tests. |
|
I think now it should have been fixed. |
|
No new commits pushed to GitHub, and label not yet changed. |
|
Sorry for all this, But i think it should be fixed now. Thank you for your time. |
|
One of the commit fixed the bug but it wasn't pushed to GitHub before. However, a newer commit reintroduced the bug. So the bug remains. |
|
It should be fixed now. Thank you for your time and patience. |
Learners, PR Template
Self checklist
Changelist
Completed all exercises.