forked from TheAlgorithms/JavaScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAlphaNumericPalindrome.test.js
More file actions
21 lines (16 loc) · 1.06 KB
/
Copy pathAlphaNumericPalindrome.test.js
File metadata and controls
21 lines (16 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { alphaNumericPlaindrome } from '../AlphaNumericPalindrome'
test('should return true if the given string has alphanumeric characters that are palindrom irrespective of case and symbols', () => {
expect(alphaNumericPlaindrome('eye')).toBe(true)
})
test('should return true if the given string has alphanumeric characters that are palindrom irrespective of case and symbols', () => {
expect(alphaNumericPlaindrome('0_0 (: /-:) 0-0')).toBe(true)
})
test('should return true if the given string has alphanumeric characters that are palindrom irrespective of case and symbols', () => {
expect(alphaNumericPlaindrome('five|_/|four')).toBe(false)
})
test('should return true if the given string has alphanumeric characters that are palindrom irrespective of case and symbols', () => {
expect(alphaNumericPlaindrome('A man, a plan, a canal. Panama')).toBe(true)
})
test('should return true if the given string has alphanumeric characters that are palindrom irrespective of case and symbols', () => {
expect(alphaNumericPlaindrome('1 eye for of 1 eye.')).toBe(false)
})