Add integration tests for docs build pipeline #67
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 itemstest_export_item_has_required_fields— key, title, tags, collections all presenttest_export_abstracts_not_truncated— full abstracts exported (no 300-char cap)test_export_tags_match_tag_list— tags in items match tags arrayextract_docs.py tests:
test_extract_produces_api_docs— verify docs/docs/api/ has >0 .md filestest_extract_module_has_content— spot check a known module has functionslibrary.tsx tests (if using a test framework):
test_library_page_builds— verify npm run build succeedstest_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 pagesFiles
tests/docs/test_docs_build.py(new)tests/docs/__init__.py(new)