Test cleanup and fixes [o-p]

This commit is contained in:
Angelos Chalaris
2018-06-18 18:00:19 +03:00
parent 9f95330528
commit 072728dad2
35 changed files with 164 additions and 262 deletions

View File

@ -1,16 +1,13 @@
const expect = require('expect');
const partialRight = require('./partialRight.js');
test('partialRight is a Function', () => {
test('partialRight is a Function', () => {
expect(partialRight).toBeInstanceOf(Function);
});
function greet(greeting, name) {
return greeting + ' ' + name + '!';
}
const greetJohn = partialRight(greet, 'John');
test('Appends arguments', () => {
expect(greetJohn('Hello'), 'Hello John!').toBe()
function greet(greeting, name) {
return greeting + ' ' + name + '!';
}
const greetJohn = partialRight(greet, 'John');
test('Appends arguments', () => {
expect(greetJohn('Hello')).toBe('Hello John!');
});