test.web/core/formatters/link.formatter.test.ts
test.web/core/formatters/link.formatter.test.ts is a file in Codebase Testing. 8 lines of code and 0 definitions.
import { describe, expect, it } from "vitest";
import { anchorMarkup } from "@banes-lab/web/core/formatters/link.formatter.ts";
describe("anchorMarkup", () => {
it("wraps a label in an anchor to its href, and leaves the label plain with no href", () => {
expect(anchorMarkup("/records/lexicon/cache", "Cache")).toBe('<a href="/records/lexicon/cache">Cache</a>');
expect(anchorMarkup(null, "Cache")).toBe("Cache");
});
});