Test cleanup and fixes [c-d]

This commit is contained in:
Angelos Chalaris
2018-06-18 16:34:04 +03:00
parent d29974ebc9
commit 105185c213
136 changed files with 805 additions and 484 deletions

View File

@ -5,7 +5,13 @@ const sumPower = require('./sumPower.js');
test('sumPower is a Function', () => {
expect(sumPower).toBeInstanceOf(Function);
});
t.equal(sumPower(10), 385, "Returns the sum of the powers of all the numbers from start to end");
t.equal(sumPower(10, 3), 3025, "Returns the sum of the powers of all the numbers from start to end");
t.equal(sumPower(10, 3, 5), 2925, "Returns the sum of the powers of all the numbers from start to end");
test('Returns the sum of the powers of all the numbers from start to end', () => {
expect(sumPower(10)).toBe(385)
});
test('Returns the sum of the powers of all the numbers from start to end', () => {
expect(sumPower(10, 3)).toBe(3025)
});
test('Returns the sum of the powers of all the numbers from start to end', () => {
expect(sumPower(10, 3, 5)).toBe(2925)
});