mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-05 16:26:47 +08:00
adding test file for AlphaNumericPalindrome algorithm
This commit is contained in:
21
String/test/AlphaNumericPalindrome.test.js
Normal file
21
String/test/AlphaNumericPalindrome.test.js
Normal file
@ -0,0 +1,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)
|
||||
})
|
Reference in New Issue
Block a user