ran npm run tdd
This commit is contained in:
5
test/mapKeys/mapKeys.js
Normal file
5
test/mapKeys/mapKeys.js
Normal file
@ -0,0 +1,5 @@
|
||||
module.exports = mapKeys = (obj, fn) =>
|
||||
Object.keys(obj).reduce((acc, k) => {
|
||||
acc[fn(obj[k], k, obj)] = obj[k];
|
||||
return acc;
|
||||
}, {});
|
||||
13
test/mapKeys/mapKeys.test.js
Normal file
13
test/mapKeys/mapKeys.test.js
Normal file
@ -0,0 +1,13 @@
|
||||
const test = require('tape');
|
||||
const mapKeys = require('./mapKeys.js');
|
||||
|
||||
test('Testing mapKeys', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
t.true(typeof mapKeys === 'function', 'mapKeys is a Function');
|
||||
//t.deepEqual(mapKeys(args..), 'Expected');
|
||||
//t.equal(mapKeys(args..), 'Expected');
|
||||
//t.false(mapKeys(args..), 'Expected');
|
||||
//t.throws(mapKeys(args..), 'Expected');
|
||||
t.end();
|
||||
});
|
||||
Reference in New Issue
Block a user