Skip to content

Commit 2d2960d

Browse files
committed
test: add missing test for non-array input in describeMedian function
1 parent edf099c commit 2d2960d

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@ test("returns a sentence for an empty array", () => {
3131
);
3232
});
3333

34-
35-
34+
test("return a sentence for a non-array", () => {
35+
expect(describeMedian("banana")).toBe(
36+
"Could not calculate median: calculateMedian requires an array of numbers"
37+
);
38+
});
3639

3740
// Given an empty array
3841
// When passed to describeMedian

0 commit comments

Comments
 (0)