Files
EpicNext-Cms/src/components/header-user-identity.test.tsx
T
Simo 0bd2ac6707
CI / check (push) Successful in 25s
CI / release (push) Skipped
CI / deploy (push) Successful in 45s
fix: separate header avatar from username
2026-08-10 18:45:38 +02:00

22 lines
622 B
TypeScript

import { renderToStaticMarkup } from "react-dom/server";
import { describe, expect, it } from "vitest";
import { HeaderUserIdentity } from "./header-user-identity";
describe("HeaderUserIdentity", () => {
it("keeps the 40px head separated from the username", () => {
const html = renderToStaticMarkup(
<HeaderUserIdentity
figure="hd-180-1.hr-828-45"
username="Life"
textColor="#ffffff"
/>,
);
expect(html).toContain("gap-2");
expect(html).toContain('width="40"');
expect(html).toContain('height="40"');
expect(html).toContain(">Life</span>");
expect(html).not.toContain("-ml-");
});
});