evOo-local/apps/web/src/lib/bootstrap-target.test.ts
cynarAI 6c7eed7580 Initial clean evOo-local from f00577b
Fresh history cut from cynarAI/evoo antigravity-handoff/project-timeline
(Voice First + project timeline). Brand docs/titles as evOo; keep @rakazo/*
packages as tech debt. Excludes node_modules, caches, secrets, voice blobs.
2026-09-20 17:15:16 +02:00

23 lines
926 B
TypeScript

import { describe, expect, it } from "vitest";
import { initialBootstrapTarget } from "./bootstrap-target";
describe("initial bootstrap target", () => {
it("primes the Electron root before its client-side redirect", () => {
expect(initialBootstrapTarget("/", true)).toEqual({ botId: undefined });
expect(initialBootstrapTarget("/", false)).toBeNull();
});
it("primes browser app routes and decodes their selected bot", () => {
expect(initialBootstrapTarget("/app", false)).toEqual({ botId: undefined });
expect(initialBootstrapTarget("/app/research%20bot", false)).toEqual({
botId: "research bot",
});
expect(initialBootstrapTarget("/app/g/group-1", false)).toEqual({ botId: undefined });
});
it("does not prime unrelated routes", () => {
expect(initialBootstrapTarget("/sign-in", true)).toBeNull();
expect(initialBootstrapTarget("/onboarding", false)).toBeNull();
});
});