Test cleanup and fixes [s-t]

This commit is contained in:
Angelos Chalaris
2018-06-18 18:37:35 +03:00
parent ba3e684a27
commit 9cf2c4680c
53 changed files with 286 additions and 409 deletions

View File

@ -1,17 +1,15 @@
const expect = require('expect');
const sumPower = require('./sumPower.js');
test('sumPower is a Function', () => {
test('sumPower is a Function', () => {
expect(sumPower).toBeInstanceOf(Function);
});
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)).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)).toBe(3025);
});
test('Returns the sum of the powers of all the numbers from start to end', () => {
expect(sumPower(10, 3, 5)).toBe(2925)
test('Returns the sum of the powers of all the numbers from start to end', () => {
expect(sumPower(10, 3, 5)).toBe(2925);
});