ran npm run tdd

This commit is contained in:
King
2018-01-15 10:58:44 -05:00
parent 56f977bf63
commit 58c65ecf1e
28 changed files with 247 additions and 0 deletions

1
test/minBy/minBy.js Normal file
View File

@ -0,0 +1 @@
module.exports = minBy = (arr, fn) => Math.min(...arr.map(typeof fn === 'function' ? fn : val => val[fn]));

13
test/minBy/minBy.test.js Normal file
View File

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