import { describe, expect, test } from "bun:test";
import { readFileSync } from "node:fs";

describe("sign-in header affordance", () => {
	test("auth control switches to an icon-only mobile affordance via useIsMobile", () => {
		const source = readFileSync("src/components/sign-in.tsx", "utf8");

		expect(source).toContain("useIsMobile");
		expect(source).toContain('size={isMobile ? "icon" : "sm"}');
		expect(source).toContain('aria-label={session?.user ? "Sign out" : "Sign in"}');
	});
});
