allinix-demo/next/__tests__/whitespace.test.ts
2025-02-17 20:46:14 +05:30

17 lines
565 B
TypeScript

import { isEmptyOrBlank } from "../src/utils/whitespace";
describe("WhiteSpace and empty string should return true", () => {
test("Empty string should return true", () => {
const emptyString = "";
expect(isEmptyOrBlank(emptyString)).toEqual(true);
})
test("WhiteSpace string should return true", () => {
const whiteSpaceString = " ";
expect(isEmptyOrBlank(whiteSpaceString)).toEqual(true);
})
test("NewLine should return true", () => {
const newLineString = "\n\n";
expect(isEmptyOrBlank(newLineString)).toEqual(true);
})
})