Travis build: 1358 [cron]
This commit is contained in:
8
test/matchesWith/matchesWith.js
Normal file
8
test/matchesWith/matchesWith.js
Normal file
@ -0,0 +1,8 @@
|
||||
const matchesWith = (obj, source, fn) =>
|
||||
Object.keys(source).every(
|
||||
key =>
|
||||
obj.hasOwnProperty(key) && fn
|
||||
? fn(obj[key], source[key], key, obj, source)
|
||||
: obj[key] == source[key]
|
||||
);
|
||||
module.exports = matchesWith
|
||||
13
test/matchesWith/matchesWith.test.js
Normal file
13
test/matchesWith/matchesWith.test.js
Normal file
@ -0,0 +1,13 @@
|
||||
const test = require('tape');
|
||||
const matchesWith = require('./matchesWith.js');
|
||||
|
||||
test('Testing matchesWith', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
t.true(typeof matchesWith === 'function', 'matchesWith is a Function');
|
||||
//t.deepEqual(matchesWith(args..), 'Expected');
|
||||
//t.equal(matchesWith(args..), 'Expected');
|
||||
//t.false(matchesWith(args..), 'Expected');
|
||||
//t.throws(matchesWith(args..), 'Expected');
|
||||
t.end();
|
||||
});
|
||||
Reference in New Issue
Block a user