import { describe, expect, it } from "vitest"; import { routeFor } from "./routing"; describe("entry routing (SD-0001 ยง6.5)", () => { it("no session -> landing", () => { expect(routeFor({ account: null, storefront: null })).toBe("landing"); }); it("session without storefront -> create-storefront", () => { expect(routeFor({ account: { email: "m@example.com" }, storefront: null })).toBe( "create-storefront", ); }); it("session with storefront -> admin", () => { expect( routeFor({ account: { email: "m@example.com" }, storefront: { id: 1, name: "Shop" } }), ).toBe("admin"); }); });