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