You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
522 B
TypeScript
21 lines
522 B
TypeScript
import { describe, it, expect } from "vitest";
|
|
import { isPalindrome } from "./isPalindrome.ts";
|
|
|
|
describe("isPalindrome", () => {
|
|
it("A man, a plan, a canal: Panama => true", () => {
|
|
expect(isPalindrome("A man, a plan, a canal: Panama")).toBeTruthy();
|
|
});
|
|
|
|
it("race a car => false", () => {
|
|
expect(isPalindrome("race a car")).toBeFalsy();
|
|
});
|
|
|
|
it(" _ => true", () => {
|
|
expect(isPalindrome(" ")).toBeTruthy();
|
|
});
|
|
|
|
it(" 0P => false", () => {
|
|
expect(isPalindrome("0P")).toBeFalsy();
|
|
});
|
|
});
|