mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-18 01:05:42 +08:00
17 lines
576 B
JavaScript
17 lines
576 B
JavaScript
import { checkPalindrome } from './CheckPalindrome'
|
|
|
|
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')
|
|
})
|
|
})
|