Skip to content

Commit 0667c52

Browse files
committed
Fix sum function test to return 0 for empty array case
1 parent c52700a commit 0667c52

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const sum = require("./sum.js");
1414
// When passed to the sum function
1515
// Then it should return 0
1616
test("given an empty array, returns 0", () => {
17-
expect(sum([])).toBe();
17+
expect(sum([])).toBe(0);
1818
});
1919

2020
// Given an array with just one number

0 commit comments

Comments
 (0)