Add integration tests for docs build pipeline #67

Closed
opened 2026-03-21 19:27:39 +00:00 by kert · 0 comments
Owner

Problem

No tests verify the docs build pipeline works. Broken exports, missing data, and stale links go undetected until someone manually checks the deployed site.

Tests to add (tests/docs/test_docs_build.py):

export_library.py tests:

  • test_export_produces_nonempty_json — verify library.json has >0 items
  • test_export_item_has_required_fields — key, title, tags, collections all present
  • test_export_abstracts_not_truncated — full abstracts exported (no 300-char cap)
  • test_export_tags_match_tag_list — tags in items match tags array

extract_docs.py tests:

  • test_extract_produces_api_docs — verify docs/docs/api/ has >0 .md files
  • test_extract_module_has_content — spot check a known module has functions

library.tsx tests (if using a test framework):

  • test_library_page_builds — verify npm run build succeeds
  • test_library_json_in_build_output — verify library.json is in build/
  • test_intro_links_resolve — parse intro.md, verify all links point to real pages

Files

  • tests/docs/test_docs_build.py (new)
  • tests/docs/__init__.py (new)
## Problem No tests verify the docs build pipeline works. Broken exports, missing data, and stale links go undetected until someone manually checks the deployed site. ## Tests to add (tests/docs/test_docs_build.py): ### export_library.py tests: - `test_export_produces_nonempty_json` — verify library.json has >0 items - `test_export_item_has_required_fields` — key, title, tags, collections all present - `test_export_abstracts_not_truncated` — full abstracts exported (no 300-char cap) - `test_export_tags_match_tag_list` — tags in items match tags array ### extract_docs.py tests: - `test_extract_produces_api_docs` — verify docs/docs/api/ has >0 .md files - `test_extract_module_has_content` — spot check a known module has functions ### library.tsx tests (if using a test framework): - `test_library_page_builds` — verify npm run build succeeds - `test_library_json_in_build_output` — verify library.json is in build/ ### Broken link tests: - `test_intro_links_resolve` — parse intro.md, verify all links point to real pages ## Files - `tests/docs/test_docs_build.py` (new) - `tests/docs/__init__.py` (new)
kert added this to the P13: Docs Search — local search, library data, broken links, tests milestone 2026-03-21 19:27:39 +00:00
kert added the docsquality labels 2026-03-21 19:27:39 +00:00
kert closed this issue 2026-03-21 19:34:14 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: homelab/stack#67