London | 26-ITP-May | Gideon Defar | sprint 1 | Coursework - #1437
gideondefar wants to merge 7 commits into
Conversation
|
I think your code is well organised and test cases are also clearly written. Keep it up. :-) |
Thanks for the positive feedback but the label was changed to "reviewed" is it intensional or its made by accident? |
|
Two things to sort before this can be marked complete: 1. The refactor exercise hasn't been started
The function still uses the original indexed 2. The fix exercise: work in
The test file is what needs to pass for this exercise, so leave it exactly as it was and change only Hint: your first line in Everything in the |
@hackertainment I hope fixed and completed sprint 1 exercises. |
|
https://github.com/CodeYourFuture/Module-Data-Groups/pull/1437/changes/BASE..99b017e656a5d1061c2dcf1bb81cc69aba5cd031#r3820288450 |
@hackertainment added test cases and tested on the terminal thanks for the review. |
| test("ignores non-number values", () => { | ||
| expect(calculateMedian([1, "a", 2, 3])).toEqual(2); | ||
| expect(calculateMedian([5, "x", 1, 3])).toEqual(3); | ||
| }); |
There was a problem hiding this comment.
There are two cases in the "ignores non-number values" suite and both are odd number of elements aftrer filtering. Maybe consider next time also have even number of elements after filtering. I will let you pass this time since this is just a minor issue and your other test cases have good coverage.
| // 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 | ||
| // Then it should return the least surprising value given how it behaves for all other inputs No newline at end of file |
There was a problem hiding this comment.
Missing test case for this one and please add it as well. Thank you.
| @@ -1 +1 @@ | |||
| // Refactor the implementation of includes to use a for...of loop | |||
There was a problem hiding this comment.
please modify the for(...) loop into for(...of...) loop in the code below. Thank you.

Self checklist
Changelist
Completed all mandatory Sprint 1 exercises. The optional Stretch exercise was not completed due to time constraints.