Travis build: 2114 [cron]

This commit is contained in:
30secondsofcode
2018-05-31 21:18:41 +00:00
parent 91d9546169
commit 19d7818ae6
5 changed files with 64 additions and 24 deletions

7
test/toHash/toHash.js Normal file
View File

@ -0,0 +1,7 @@
const toHash = (object, key) =>
Array.prototype.reduce.call(
object,
(acc, data, index) => ((acc[!key ? index : data[key]] = data), acc),
{}
);
module.exports = toHash;

View File

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