Test cleanup and fixes [a-b]

This commit is contained in:
Angelos Chalaris
2018-06-18 15:54:48 +03:00
parent a78f5db260
commit 026c65a5e6
151 changed files with 753 additions and 373 deletions

View File

@ -1,17 +1,14 @@
const expect = require('expect');
const bind = require('./bind.js');
test('bind is a Function', () => {
test('bind is a Function', () => {
expect(bind).toBeInstanceOf(Function);
});
function greet(greeting, punctuation) {
return greeting + ' ' + this.user + punctuation;
}
const freddy = { user: 'fred' };
const freddyBound = bind(greet, freddy);
test('Binds to an object context', () => {
expect(freddyBound('hi', '!'),'hi fred!').toBe()
function greet(greeting, punctuation) {
return greeting + ' ' + this.user + punctuation;
}
const freddy = { user: 'fred' };
const freddyBound = bind(greet, freddy);
test('Binds to an object context', () => {
expect(freddyBound('hi', '!')).toBe('hi fred!');
});