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