Added some tests
This commit is contained in:
@ -5,9 +5,17 @@ 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');
|
||||
var view = {
|
||||
label: 'docs',
|
||||
'click': function() {
|
||||
return 'clicked ' + this.label;
|
||||
}
|
||||
}
|
||||
bindAll(view, 'click');
|
||||
t.equal(view.click(), 'clicked docs', 'Binds to an object context')
|
||||
//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