StatusTable
<StatusTable> renders a live test-status board from a
test-results.json file served at the site root. DreamLake sites use
it for a "current build health" page whose data is regenerated by CI —
the docs never claim more than the last run proved.
Usage in MDX
Both components are in the MDX component map — no import needed. They
fetch /test-results.json on mount (client-side only, cache: no-store so a CI refresh shows immediately) and render an empty state
until the file exists.
Data contract
status is pass | fail | skip (suites also allow pending).
Optional fields: exit_code, reason, log_excerpt, doc_link.
TestStatus
The companion inline chip references a single suite or example — drop it next to prose that describes the thing being tested:
Props
| Component | Prop | Type | Description |
|---|---|---|---|
StatusTable | kind | 'suites' | 'examples' | Which half of the results file to render (default 'suites'). |
TestStatus | suite | string | Suite id to reference. |
TestStatus | example | string | Example id to reference (use one of the two). |
Edge cases
- Missing file: a 404 (or invalid JSON) renders a bordered "Could not load test results" note — the page still builds and prerenders fine, since the fetch only happens in the browser.
- Empty arrays:
suites: []renders a muted "No suites reported yet" hint instead of an empty table. TestStatuswith an unknown id renders a mutedunknownchip; while the fetch is in flight it showsloading…. A found id renders the status badge plus the file'sgenerated_atage (e.g.3h ago) — the age is per-run, not per-suite.- This docs site does not ship a
test-results.json, which is why this page shows the markup as snippets rather than a live embed — a live<StatusTable />here would render the missing-file state.