Skip to content

πŸ› fix(public): docs integration tests depend on real on-disk guides β€” make the file consumer-independentΒ #4015

Description

@PierreBrisorgueil

What β€” the public docs integration tests still depend on the repo's REAL on-disk guides in several places; make the whole file consumer-independent (controlled fixtures only).

Why β€” #4014 fixed the precedence describe block, but the same failure class remains elsewhere in modules/public/tests/public.docs.integration.tests.js. Concrete instance: GET /api/public/docs/:slug.md returns raw markdown for a known slug asserts the framework quickstart's placeholder content (<YOUR_API_KEY>). A consumer shipping its own guide at the quickstart slug now deterministically WINS that slug (by design, #4011) β€” the test then receives the consumer's markdown and fails, in a test environment that has no docs.excludeModules mitigation. Any assertion pinned to which real guide wins a globally-shared slug is a consumer-dependence bug by construction.

Scope β€” modules/public/tests/public.docs.integration.tests.js, whole-file sweep:

  • Every test that reads real guide content or counts real guides moves to a controlled fixture set (config.files.guides fully replaced in the relevant describe blocks, restored after β€” the fix(public): make slug-collision precedence fixture self-containedΒ #4014 pattern), or asserts shape/status only (200, markdown content-type) where content is irrelevant.
  • The :slug.md raw-markdown test: fixture guide with a unique slug + assert ITS content.
  • Zero source changes. The suite must pass identically on the bare stack AND in any consumer repo regardless of what guides the consumer ships.

Scope: validated 2026-08-04

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions