Files
30-seconds-of-code/test/sumPower/sumPower.test.js
Angelos Chalaris 4f7da1be9b Test migration to jest by hand
Apparently using regular expressions is way easier.
2018-06-18 15:15:56 +03:00

12 lines
483 B
JavaScript

const expect = require('expect');
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");