Skip to content

Add unit tests for sync-catalog.mjs parsing (extractBlurb, injectCatalog/extractBetweenMarkers) #323

Description

@Simone319

Follow-up from PR #124 review (thread on scripts/sync-catalog.mjs). The two build scripts (sync-catalog.mjs, gen-block-docs.mjs) have no unit tests — only CI invocation. Pin the parsing behaviors that silently corrupt output: extractBlurb (h1 detection, sentence truncation, <!--/# break conditions) and injectCatalog/extractBetweenMarkers (missing-marker throw-on-write vs exit-1-on-check, end<begin handling). Table-driven fixtures would lock the contract the CI catalog gate depends on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pending-maintainer-responseWaiting on a response from the maintainerspending-triageIssue is pending triage by the maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions