Files
30-seconds-of-code/test/palindrome/palindrome.test.js
2018-06-18 18:00:19 +03:00

13 lines
367 B
JavaScript

const expect = require('expect');
const palindrome = require('./palindrome.js');
test('palindrome is a Function', () => {
expect(palindrome).toBeInstanceOf(Function);
});
test('Given string is a palindrome', () => {
expect(palindrome('taco cat')).toBeTruthy();
});
test('Given string is not a palindrome', () => {
expect(palindrome('foobar')).toBeFalsy();
});