Artifact 0052df1f7bf6c5d994996e380434d6043d07aac33753f6752cea3f58dc53aae8:
- File
internal/api/docs_test.go
— part of check-in
[fb2f393a1e]
at
2026-08-15 23:02:23
on branch trunk
— docs: API reference generated from the registry; staleness gate
quarry docs + make docs; TestDocsCurrent fails when docs/api.md drifts (0003: documentation is a phase exit criterion). (user: dmestas, size: 646) [annotate] [blame] [check-ins using]
package api import ( "os" "testing" "craftdesign.group/quarry/internal/ops" ) // TestDocsCurrent is the documentation exit criterion (0003): docs/api.md // must match what the registry generates. Regenerate with `make docs`. func TestDocsCurrent(t *testing.T) { r := ops.NewRegistry() if err := RegisterAll(r, Deps{Version: "v"}); err != nil { t.Fatal(err) } want := ops.Docs(r, "quarry") got, err := os.ReadFile("../../docs/api.md") if err != nil { t.Fatalf("docs/api.md unreadable (run `make docs`): %v", err) } if string(got) != string(want) { t.Fatal("docs/api.md is stale — run `make docs` and commit the result") } }