ran npm run tdd & generated TDD
This commit is contained in:
4
test/geometricProgression/geometricProgression.js
Normal file
4
test/geometricProgression/geometricProgression.js
Normal file
@ -0,0 +1,4 @@
|
||||
module.exports = (end, start = 1, step = 2) =>
|
||||
Array.from({ length: Math.floor(Math.log(end / start) / Math.log(step)) + 1 }).map(
|
||||
(v, i) => start * step ** i
|
||||
);
|
||||
13
test/geometricProgression/geometricProgression.test.js
Normal file
13
test/geometricProgression/geometricProgression.test.js
Normal file
@ -0,0 +1,13 @@
|
||||
const test = require('tape');
|
||||
const geometricProgression = require('./geometricProgression.js');
|
||||
|
||||
test('Testing geometricProgression', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
t.true(typeof geometricProgression === 'function', 'geometricProgression is a Function');
|
||||
//t.deepEqual(geometricProgression(args..), 'Expected');
|
||||
//t.equal(geometricProgression(args..), 'Expected');
|
||||
//t.false(geometricProgression(args..), 'Expected');
|
||||
//t.throws(geometricProgression(args..), 'Expected');
|
||||
t.end();
|
||||
});
|
||||
Reference in New Issue
Block a user