Test cleanup and fixes [o-p]
This commit is contained in:
@ -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!');
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user