Cape Town | 26-ITP-Jan | Pretty Taruvinga | Sprint 1 | Data Groups#1104
Open
Pretty548 wants to merge 17 commits intoCodeYourFuture:mainfrom
Open
Cape Town | 26-ITP-Jan | Pretty Taruvinga | Sprint 1 | Data Groups#1104Pretty548 wants to merge 17 commits intoCodeYourFuture:mainfrom
Pretty548 wants to merge 17 commits intoCodeYourFuture:mainfrom
Conversation
added 10 commits
March 7, 2026 14:25
…om>fix: correct calculateMedian implementation and handle non-array inputs
This comment has been minimized.
This comment has been minimized.
cjyuan
reviewed
Mar 26, 2026
added 6 commits
March 27, 2026 13:15
…om>Add reference check to ensure dedupe returns a copy of the array
cjyuan
reviewed
Mar 27, 2026
Comment on lines
+35
to
+41
| test("Given an array with no duplicates, when passed to the dedupe function, then it should return a copy of the original array", () => { | ||
| const input = ["a", "b", "c"]; | ||
| const result = dedupe(input); | ||
|
|
||
| expect(result).toEqual(input); | ||
| expect(result).not.toBe(input); | ||
| }); |
Contributor
There was a problem hiding this comment.
There is a chance that, even though result has incorrect elements (for example, []),
the two tests could still pass. Can you figure out why, and then fix the tests accordingly?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Learners, PR Template
Self checklist
Changelist