Files
Website/resources/js/tests/string.test.ts
2023-04-27 13:33:29 +10:00

15 lines
493 B
TypeScript

import { expect, describe, it } from "vitest";
import { toTitleCase } from "../helpers/string";
describe("toTitleCase()", () => {
it("should return a converted title case string", () => {
const result = toTitleCase("titlecase");
expect(result).toEqual("Titlecase");
});
it("should return a converted title case string and spaces", () => {
const result = toTitleCase("titlecase_and_more");
expect(result).toEqual("Titlecase And More");
});
});