Skip to content

Wire unit tests into CI (no test:unit script exists today) #168

@kriszyp

Description

@kriszyp

Integration tests are running in CI on push to main / release branches and on PRs via integration-tests.yaml. The integration migration to @harperfast/integration-testing landed via HarperFast/harper-pro#103 and follow-ups.

What still needs work:

  • package.json exposes no test / test:unit script — only test:integration*. The claude-issue-to-pr.yml workflow explicitly notes "There is no npm test / test:unit script — only npm run test:integration".
  • unitTests/ and core/unitTests/ directories exist with test files (mocha-style based on .mocharc.json in core), but nothing in CI runs them.

Asks

  • Add a test:unit script in package.json (and core/package.json if it doesn't already have one) that exercises the existing unitTests/ and core/unitTests/ trees.
  • Add a unit-tests.yaml CI workflow (or extend integration-tests.yaml) to run npm run test:unit on push to main / release branches and on PRs.
  • Drop the claude-issue-to-pr.yml comment about no unit-test script once it's wired up.

Acceptance criteria

  • npm run test:unit runs all unit tests and exits non-zero on failure.
  • CI runs unit tests on every PR and push to a release branch.
  • README / CONTRIBUTING reflects the unit-test command.

Notes

  • npm run build || true in the integration-tests workflow tolerates type errors today — keep that for the integration job until those are addressed separately, but the unit-test job shouldn't tolerate them.

Tracked in Jira: CORE-3020
Jira fixVersion is v5.0 (already released / overdue) — retarget to V5.1.

🤖 Filed by Claude on behalf of Kris.

Metadata

Metadata

Labels

area:ciCI workflows, GitHub Actions, release automationenhancementNew feature or requestfrom-jiraMigrated or originated from a Jira ticket

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions