Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1.34 KB

File metadata and controls

37 lines (28 loc) · 1.34 KB

TESTING

This document describes MHA testing policy, local test execution, coverage requirements, and CI validation.

Test policy

  • Major functionality changes must include or update automated Jest tests in the same pull request.
  • When behavior changes, contributors are expected to add or update tests that validate the new behavior.
  • Automated tests must include assertion checks (Jest expect(...)) for behavior verification.
  • Pull requests are validated by CI running npm test.
  • Global minimum coverage thresholds are enforced in jest.config.ts:
    • branches: 35
    • functions: 40
    • lines: 40
    • statements: 40

Local testing workflow

  1. Install dependencies: npm install
  2. Start local development server when validating UI behavior: npm run dev-server
  3. Run lint and fix issues: npm run lint
  4. Run tests: npm test

Test outputs

CI test validation

  • Workflow: .github/workflows/jest.yml
  • Triggered on pull requests, merge groups, workflow dispatch, and pushes to main.
  • CI executes:
    • npm ci
    • npm test