Skip to content

Commit 320a5fa

Browse files
committed
test: update calculateMean test case to return correct mean for multiple numbers
1 parent 9d715a4 commit 320a5fa

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎Sprint-1/implement/mean.test.js‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,13 @@ const calculateMean = require("./mean.js");
2424
// Then it should return their mean
2525
// Delete this test.todo and replace it with a test.
2626
test("given [1, 2, 6], returns 3", () => {
27-
expect(calculateMean([8])).toBe(8);
27+
expect(calculateMean([1, 2, 6])).toBe(3);
2828
});
2929

30+
test("returns the number for a single item array", () => {
31+
expect(calculateMean)
32+
})
33+
3034
// Given an array with a single number
3135
// When passed to calculateMean
3236
// Then it should return that number

0 commit comments

Comments
 (0)