Skip to content

Smoke test: run prpack on a tiny fixture, assert output structure #3

@Lucas2944

Description

@Lucas2944

Context: prpack has no automated tests. The CLI has been manually verified on real repos, but a basic smoke test would catch regressions in output structure.

Goal: add a tiny test that:

  1. Creates a temp directory with a 2-commit git repo (2 files, one renamed, one modified)
  2. Runs `node bin/prpack.js --base HEAD~1 --head HEAD --out /out.md --quiet`
  3. Asserts the output contains:
    • The string `# Pull Request Context`
    • The string `## Commits`
    • The string `## Files changed`
    • One `### Diff` block per modified file
    • One `### Full content (post-change)` block per modified file

Plain Node assertions are fine — no test framework needed (zero-deps philosophy).

Wiring: add a `test` script to package.json and a `.github/workflows/test.yml` that runs it on push.

Acceptance: test passes locally and in CI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions