Travis build: 1421 [cron]

This commit is contained in:
30secondsofcode
2018-01-25 20:13:01 +00:00
parent 7c7b239819
commit 2445607d0c
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();
});

View File

@ -1,4 +1,4 @@
Test log for: Wed Jan 24 2018 20:13:12 GMT+0000 (UTC)
Test log for: Thu Jan 25 2018 20:12:57 GMT+0000 (UTC)
> 30-seconds-of-code@0.0.1 test /home/travis/build/Chalarangelo/30-seconds-of-code
> tape test/**/*.test.js | tap-spec
@ -1087,6 +1087,10 @@ Test log for: Wed Jan 24 2018 20:13:12 GMT+0000 (UTC)
✔ reduceSuccessive is a Function
Testing reduceWhich
✔ reduceWhich is a Function
Testing reducedFilter
✔ reducedFilter is a Function
@ -1474,8 +1478,8 @@ Test log for: Wed Jan 24 2018 20:13:12 GMT+0000 (UTC)
✔ zipWith is a Function
total: 638
passing: 638
duration: 374ms
total: 639
passing: 639
duration: 487ms