Added some tests

This commit is contained in:
Angelos Chalaris
2018-01-28 16:28:54 +02:00
parent 5358f1b908
commit 06d7e04220
19 changed files with 257 additions and 33 deletions

View File

@ -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();
});
});