Finding
The docs repo has two Node.js scripts under scripts/ with zero test coverage:
-
scripts/build-iso-index.mjs — Transforms rclone lsjson output into the structured iso-index.json the download page uses. Contains significant data transformation logic (category mapping, URL construction, SHA256SUMS parsing, artifact grouping).
-
scripts/sync-org-docs.mjs — Aggregates READMEs and docs from all active tuna-os GitHub repos into the Docusaurus site. Contains repo filtering, README extraction, and file writing logic.
Neither script has any unit tests. The CI workflows that use them (sync-org-docs.yml, update-iso-index.yml) can only detect breakage at runtime when they fail.
Recommendation
- Add
vitest or node:test as a dev dependency
- Add tests for
build-iso-index.mjs using fixture rclone JSON input — the transformation logic is pure (stdin → stdout) and easily testable
- Add tests for
sync-org-docs.mjs core functions using temp directories and mock GitHub API responses
- Add a
npm run test step to the lint CI workflow
Priority
- Impact: medium — failures only surface at runtime; scripts are critical for site content
- Effort: medium — build-iso-index.mjs is stdin→stdout pure logic, easy to test
Filed by quality agent (ACMM L4/L6 — full mode)
Finding
The
docsrepo has two Node.js scripts underscripts/with zero test coverage:scripts/build-iso-index.mjs— Transformsrclone lsjsonoutput into the structurediso-index.jsonthe download page uses. Contains significant data transformation logic (category mapping, URL construction, SHA256SUMS parsing, artifact grouping).scripts/sync-org-docs.mjs— Aggregates READMEs and docs from all active tuna-os GitHub repos into the Docusaurus site. Contains repo filtering, README extraction, and file writing logic.Neither script has any unit tests. The CI workflows that use them (sync-org-docs.yml, update-iso-index.yml) can only detect breakage at runtime when they fail.
Recommendation
vitestornode:testas a dev dependencybuild-iso-index.mjsusing fixture rclone JSON input — the transformation logic is pure (stdin → stdout) and easily testablesync-org-docs.mjscore functions using temp directories and mock GitHub API responsesnpm run teststep to the lint CI workflowPriority
Filed by quality agent (ACMM L4/L6 — full mode)