2020-10-11 19:47:49 +00:00
|
|
|
import { checkPalindrome } from '../CheckPalindrome'
|
2020-10-04 14:38:48 -03:00
|
|
|
|
|
|
|
|
describe('checkPalindrome', () => {
|
|
|
|
|
it('expects to return "Palindrome" if the given string is a palindrome', () => {
|
|
|
|
|
const SUT = checkPalindrome('madam')
|
|
|
|
|
expect(SUT).toBe('Palindrome')
|
|
|
|
|
})
|
|
|
|
|
it('expects to return "Empty string" if the given string is empty', () => {
|
|
|
|
|
const SUT = checkPalindrome('')
|
|
|
|
|
expect(SUT).toBe('Empty string')
|
|
|
|
|
})
|
|
|
|
|
it('expects to return "Not a string" if the given string is not a string', () => {
|
|
|
|
|
const SUT = checkPalindrome(123)
|
|
|
|
|
expect(SUT).toBe('Not a string')
|
|
|
|
|
})
|
|
|
|
|
})
|