Multi-tenant platform (182 pages, 228 API routes, ~30 modules) built on a deterministic verification core: clinical-trial claims checked against ClinicalTrials.gov registered results and raw event counts (ARR/NNT/RR+CI recomputed in code, oracle-tested), code-enforced exact-span grounding, and multi-source cross-verification. Auth/RBAC/multi-tenancy, document processing at scale (unpdf + Docling), agentic workflows, Claude Science connector, compliance/audit, billing, public API, and more. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
49 lines
1.4 KiB
TypeScript
49 lines
1.4 KiB
TypeScript
import { describe, it, expect } from "vitest";
|
|
import { DEMO_EXAMPLES } from "../lib/demoExamples";
|
|
import demoClaims from "./fixtures/demo-claims.json";
|
|
|
|
interface FixtureClaim {
|
|
id: string;
|
|
claim: string;
|
|
}
|
|
|
|
const fixtureById = new Map<string, FixtureClaim>(
|
|
(demoClaims as FixtureClaim[]).map((c) => [c.id, c]),
|
|
);
|
|
|
|
describe("DEMO_EXAMPLES", () => {
|
|
it("has exactly three examples", () => {
|
|
expect(DEMO_EXAMPLES).toHaveLength(3);
|
|
});
|
|
|
|
it("uses ids that exist in the demo-claims fixture", () => {
|
|
for (const example of DEMO_EXAMPLES) {
|
|
expect(fixtureById.has(example.id)).toBe(true);
|
|
}
|
|
});
|
|
|
|
it("pins the ids in the intended landing-page order", () => {
|
|
expect(DEMO_EXAMPLES.map((e) => e.id)).toEqual([
|
|
"demo-hero-catch-lecanemab",
|
|
"demo-green-pass-sprint",
|
|
"demo-honest-abstention-sprint-mismatch",
|
|
]);
|
|
});
|
|
|
|
it("copies each claim verbatim from the matching fixture entry", () => {
|
|
for (const example of DEMO_EXAMPLES) {
|
|
const fixture = fixtureById.get(example.id);
|
|
expect(fixture).toBeDefined();
|
|
expect(example.claim.length).toBeGreaterThan(0);
|
|
expect(example.claim).toBe(fixture!.claim);
|
|
}
|
|
});
|
|
|
|
it("gives every example a non-empty label and blurb", () => {
|
|
for (const example of DEMO_EXAMPLES) {
|
|
expect(example.label.length).toBeGreaterThan(0);
|
|
expect(example.blurb.length).toBeGreaterThan(0);
|
|
}
|
|
});
|
|
});
|