Skip to content

Commit 2b5336f

Browse files
committed
modified the test of mean.
1 parent 233bf8f commit 2b5336f

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

‎Sprint-1/implement/mean.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,4 @@ function calculateMean(list) {
2121
return mean;
2222
}
2323

24-
2524
module.exports = calculateMean;

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ describe("calculateMean", () => {
4242
expect(calculateMean([10, 20.5, -10, 30.5])).toEqual(12.75);
4343
});
4444

45-
it ("returns for [1.2, 0.6, 0.005]", () => {
45+
it("returns for [1.2, 0.6, 0.005]", () => {
4646
expect(calculateMean([1.2, 0.6, 0.005])).toBeCloseTo(0.6017);
47-
4847
});
4948

5049
// Given an empty array
@@ -118,11 +117,10 @@ describe("calculateMean", () => {
118117
);
119118
});
120119

121-
it("returns for [0, NaN]", () => {
120+
it("returns for [0, NaN]", () => {
122121
() =>
123122
expect(calculateMean([0, NaN])).toThrow(
124123
new Error("calculateMean requires an array of numbers")
125124
);
126125
});
127-
128126
});

0 commit comments

Comments
 (0)