mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-08-24 07:12:18 +10:00
22 lines
875 B
TypeScript
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");
|
|
});
|
|
});
|