Migrated tests to jest
Used jest-codemods to migrate, will have to pass everything by hand before we can merge.
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
const geometricProgression = (end, start = 1, step = 2) =>
|
||||
Array.from({ length: Math.floor(Math.log(end / start) / Math.log(step)) + 1 }).map(
|
||||
(v, i) => start * step ** i
|
||||
);
|
||||
module.exports = geometricProgression;
|
||||
@@ -1,16 +0,0 @@
|
||||
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(256), [1, 2, 4, 8, 16, 32, 64, 128, 256], "Initializes an array containing the numbers in the specified range");
|
||||
t.deepEqual(geometricProgression(256, 3), [3, 6, 12, 24, 48, 96, 192], "Initializes an array containing the numbers in the specified range");
|
||||
t.deepEqual(geometricProgression(256, 1, 4), [1, 4, 16, 64, 256], "Initializes an array containing the numbers in the specified range");
|
||||
//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