Skip to content

Commit 676cb58

Browse files
committed
update
1 parent 0a69bd0 commit 676cb58

1 file changed

Lines changed: 18 additions & 17 deletions

File tree

src/generator/generator.test.ts

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -128,24 +128,25 @@ describe("profile artifact generation", () => {
128128
expect(new DOMParser().parseFromString(svg, "image/svg+xml").querySelector("parsererror")).toBeNull();
129129
});
130130

131-
it("keeps the content surface and footer inside each viewport", () => {
131+
it("keeps the content surface and footer inside the desktop viewport", () => {
132132
const config = cloneDefaultConfig();
133-
134-
for (const viewport of ["desktop", "mobile"] as const) {
135-
const document = parseSvg(renderHeroSvg(config, { viewport, theme: "dark", motion: "static" }));
136-
const root = document.documentElement;
137-
const surface = document.querySelector('[data-region="surface"]')!;
138-
const footer = document.querySelector('[data-region="footer"]')!;
139-
const width = numericAttribute(root, "width");
140-
const footerDivider = numericAttribute(root, "data-footer-divider");
141-
142-
expect(numericAttribute(surface, "x")).toBe(1);
143-
expect(numericAttribute(surface, "y")).toBe(64);
144-
expect(numericAttribute(surface, "width")).toBe(width - 2);
145-
expect(numericAttribute(surface, "height")).toBe(footerDivider - 64);
146-
expect(footer.querySelectorAll("path")).toHaveLength(1);
147-
expect(footer.querySelectorAll("text")).toHaveLength(2);
148-
}
133+
const document = parseSvg(renderHeroSvg(config, {
134+
viewport: "desktop",
135+
theme: "dark",
136+
motion: "static",
137+
}));
138+
const root = document.documentElement;
139+
const surface = document.querySelector('[data-region="surface"]')!;
140+
const footer = document.querySelector('[data-region="footer"]')!;
141+
const width = numericAttribute(root, "width");
142+
const footerDivider = numericAttribute(root, "data-footer-divider");
143+
144+
expect(numericAttribute(surface, "x")).toBe(1);
145+
expect(numericAttribute(surface, "y")).toBe(64);
146+
expect(numericAttribute(surface, "width")).toBe(width - 2);
147+
expect(numericAttribute(surface, "height")).toBe(footerDivider - 64);
148+
expect(footer.querySelectorAll("path")).toHaveLength(1);
149+
expect(footer.querySelectorAll("text")).toHaveLength(2);
149150
});
150151

151152
it("keeps README asset references in sync with the generated files", () => {

0 commit comments

Comments
 (0)