Files
Reactive-Resume/packages/pdf/src/templates/shared/primitives.test.ts
T
2026-07-30 12:39:15 +02:00

22 lines
875 B
TypeScript

import { readFileSync } from "node:fs";
import { fileURLToPath } from "node:url";
import { describe, expect, it } from "vitest";
const source = readFileSync(fileURLToPath(new URL("./primitives.tsx", import.meta.url)), "utf8");
describe("Link", () => {
it("passes the resume page underline preference to shared link styles", () => {
expect(source).toContain("metadata.page.hideLinkUnderline");
expect(source).toContain("{ hideUnderline: metadata.page.hideLinkUnderline }");
expect(source).toContain("resolved.style");
});
});
describe("SectionHeadingIcon", () => {
it("passes the resolved heading icon size through the icon size prop", () => {
expect(source).toContain("size: sizeProp");
expect(source).toContain("{...(resolvedSize === undefined ? {} : { size: resolvedSize })}");
expect(source).not.toContain("{ size: headingFontSize } as Style");
});
});