15 lines
493 B
TypeScript
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");
|
|
});
|
|
});
|