Travis build: 1421 [cron]

This commit is contained in:
30secondsofcode
2018-01-25 20:13:01 +00:00
parent 3a1ffcf693
commit d1e45e7c0f
8 changed files with 44 additions and 9 deletions

View File

@ -0,0 +1,3 @@
const reduceWhich = (arr, comparator = (a, b) => a - b) =>
arr.reduce((a, b) => (comparator(a, b) >= 0 ? b : a));
module.exports = reduceWhich

View File

@ -0,0 +1,13 @@
const test = require('tape');
const reduceWhich = require('./reduceWhich.js');
test('Testing reduceWhich', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof reduceWhich === 'function', 'reduceWhich is a Function');
//t.deepEqual(reduceWhich(args..), 'Expected');
//t.equal(reduceWhich(args..), 'Expected');
//t.false(reduceWhich(args..), 'Expected');
//t.throws(reduceWhich(args..), 'Expected');
t.end();
});