Skip to content

Commit edf099c

Browse files
committed
test: fix expected output for describeMedian function with valid input
1 parent da1d6fd commit edf099c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎Sprint-1/implement/describe-median.test.js‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ test('given [1, 2, 3], returns "The median is 2"', () => {
2525
expect(describeMedian([1, 2, 3])).toBe("Tne median is 2");
2626
});
2727

28+
test("returns a sentence for an empty array", () => {
29+
expect(describeMedian([])).toBe(
30+
"Could not calculate median: calculateMedian requires a non-empty array"
31+
);
32+
});
33+
34+
2835

2936

3037
// Given an empty array

0 commit comments

Comments
 (0)