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