Skip to content

Commit 5816364

Browse files
authored
Merge branch 'main' into sprint-3
2 parents 8649779 + 2797246 commit 5816364

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/pull_request_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Self checklist
2020
- [ ] I have committed my files one by one, on purpose, and for a reason
2121
- [ ] I have titled my PR with REGION | COHORT_NAME | FIRST_NAME LAST_NAME | PROJ_NAME
2222
- [ ] I have tested my changes
23-
- [ ] My changes follow the [style guide](https://curriculum.codeyourfuture.io/guides/contributing/)
24-
- [ ] My changes meet the [requirements](./README.md) of this task
23+
- [ ] My changes follow the [style guide](https://curriculum.codeyourfuture.io/guides/reviewing/style-guide/)
24+
- [ ] My changes meet the requirements of this task
2525

2626
## Changelist
2727

Sprint-1/fix/median.test.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@ describe("calculateMedian", () => {
2121
{ input: [5, 1, 3, 4, 2], expected: 3 },
2222
{ input: [4, 2, 1, 3], expected: 2.5 },
2323
{ input: [6, 1, 5, 3, 2, 4], expected: 3.5 },
24+
{ input: [110, 20, 0], expected: 20 },
25+
{ input: [6, -2, 2, 12, 14], expected: 6 },
2426
].forEach(({ input, expected }) =>
2527
it(`returns the correct median for unsorted array [${input}]`, () => expect(calculateMedian(input)).toEqual(expected))
2628
);
2729

28-
it("doesn't modify the input array [1, 2, 3]", () => {
29-
const list = [1, 2, 3];
30+
it("doesn't modify the input array [3, 1, 2]", () => {
31+
const list = [3, 1, 2];
3032
calculateMedian(list);
31-
expect(list).toEqual([1, 2, 3]);
33+
expect(list).toEqual([3, 1, 2]);
3234
});
3335

3436
[ 'not an array', 123, null, undefined, {}, [], ["apple", null, undefined] ].forEach(val =>
@@ -45,4 +47,4 @@ describe("calculateMedian", () => {
4547
].forEach(({ input, expected }) =>
4648
it(`filters out non-numeric values and calculates the median for [${input}]`, () => expect(calculateMedian(input)).toEqual(expected))
4749
);
48-
});
50+
});

0 commit comments

Comments
 (0)