spec-discovery test: accept a landing-page link in llms.txt, still require the docs URL

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

Claude-Session: https://claude.ai/code/session_01RZV4zJ2pDZLNN3kE5jFCmV
This commit is contained in:
Anthony Ettinger 2026-09-13 08:46:08 +00:00
parent 68f3151699
commit b2c23f724b

View file

@ -20,7 +20,12 @@ describe.each([
}); });
it("includes a reachable docs URL and the full contract in the LLM feeds", async () => { it("includes a reachable docs URL and the full contract in the LLM feeds", async () => {
expect(await llms().text()).toMatch(new RegExp(`\\[${name}\\]\\(https://[^)]+/docs/${slug}\\)`)); // A spec with a landing page is linked there and cites its docs URL after
// it; a docs-only spec is linked straight to /docs/<slug>. Both must name
// the docs URL somewhere on the line.
const text = await llms().text();
expect(text).toMatch(new RegExp(`\\[${name}\\]\\(https://[^)]+/(docs/)?${slug}\\)`));
expect(text).toContain(`/docs/${slug}`);
expect(await llmsFull().text()).toContain(readDoc(slug)!.trim()); expect(await llmsFull().text()).toContain(readDoc(slug)!.trim());
}); });