23 lines · 1.1 KB · TypeScript
RawDownload
// @effect-diagnostics nodeBuiltinImport:off// Regression coverage compares the onboarding header with the shared titlebar contract.import * as NodeFS from "node:fs"; import { describe, expect, it } from "vite-plus/test"; describe("hosted static onboarding header", () => {  it("uses the shared workspace topbar geometry", () => {    const routeSource = NodeFS.readFileSync(new URL("./_chat.index.tsx", import.meta.url), "utf8");    const onboardingStart = routeSource.indexOf("function HostedStaticOnboardingState()");    const onboardingEnd = routeSource.indexOf('<Empty className="flex-1">', onboardingStart);     expect(onboardingStart).toBeGreaterThanOrEqual(0);    expect(onboardingEnd).toBeGreaterThan(onboardingStart);     const onboardingHeader = routeSource.slice(onboardingStart, onboardingEnd);     expect(onboardingHeader).toContain("h-[var(--workspace-topbar-height)]");    expect(onboardingHeader).toContain("min-h-[var(--workspace-topbar-height)]");    expect(onboardingHeader).toContain("COLLAPSED_SIDEBAR_TITLEBAR_INSET_CLASS");    expect(onboardingHeader).not.toMatch(/(?:^|\s)(?:[\w-]+:)*py-/);  });});

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t