Updated the test system

This commit is contained in:
Angelos Chalaris
2018-10-10 23:36:17 +03:00
parent 099b3d5aa6
commit 3fd1697daa
725 changed files with 386 additions and 2333 deletions

15
test/sumPower.test.js Normal file
View File

@ -0,0 +1,15 @@
const expect = require('expect');
const {sumPower} = require('./_30s.js');
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, 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);
});