|
1 |
| -var sumAll = require('./sumAll') |
| 1 | +const sumAll = require("./sumAll"); |
2 | 2 |
|
3 |
| -describe('sumAll', function() { |
4 |
| - it('sums numbers within the range', function() { |
| 3 | +describe("sumAll", () => { |
| 4 | + it("sums numbers within the range", () => { |
5 | 5 | expect(sumAll(1, 4)).toEqual(10);
|
6 | 6 | });
|
7 |
| - xit('works with large numbers', function() { |
| 7 | + it("works with large numbers", () => { |
8 | 8 | expect(sumAll(1, 4000)).toEqual(8002000);
|
9 | 9 | });
|
10 |
| - xit('works with larger number first', function() { |
| 10 | + it("works with larger number first", () => { |
11 | 11 | expect(sumAll(123, 1)).toEqual(7626);
|
12 | 12 | });
|
13 |
| - xit('returns ERROR with negative numbers', function() { |
14 |
| - expect(sumAll(-10, 4)).toEqual('ERROR'); |
| 13 | + it("returns ERROR with negative numbers", () => { |
| 14 | + expect(sumAll(-10, 4)).toEqual("ERROR"); |
15 | 15 | });
|
16 |
| - xit('returns ERROR with non-number parameters', function() { |
17 |
| - expect(sumAll(10, "90")).toEqual('ERROR'); |
| 16 | + it("returns ERROR with non-number parameters", () => { |
| 17 | + expect(sumAll(10, "90")).toEqual("ERROR"); |
18 | 18 | });
|
19 |
| - xit('returns ERROR with non-number parameters', function() { |
20 |
| - expect(sumAll(10, [90, 1])).toEqual('ERROR'); |
| 19 | + it("returns ERROR with non-number parameters", () => { |
| 20 | + expect(sumAll(10, [90, 1])).toEqual("ERROR"); |
21 | 21 | });
|
22 | 22 | });
|
0 commit comments