vibeguard/tests/hash.test.ts

9 lines
338 B
TypeScript

import { describe, expect, it } from "vitest";
import { hashText, normalizeText } from "../src/shared/hash";
describe("text hashing", () => {
it("normalizes whitespace and casing", () => {
expect(normalizeText(" Hello\n WORLD ")).toBe("hello world");
expect(hashText("hello world")).toBe(hashText("HELLO\nWORLD"));
});
});