Skip to content

Improve doctor.ts mutation coverage #96

@jmcte

Description

@jmcte

Context

Stryker mutation testing is configured and currently passes the permissive break threshold, but src/lib/doctor.ts is the weakest configured target:

doctor.ts mutation score: 54.09%
doctor.ts covered mutation score: 59.12%

That leaves too many operator-facing health-check branches alive after mutation.

Scope

  • Review surviving and no-coverage mutants for src/lib/doctor.ts.
  • Add focused tests for missing environment, missing host fields, GitHub verification failure surfaces, Lume status artifact handling, and user-facing report details where mutants survived.
  • Prefer behavioral assertions over broad snapshots.
  • Keep tests local and fully mocked; do not require live Synology or GitHub credentials.

Acceptance Criteria

  • pnpm test -- test/doctor.test.ts passes.
  • pnpm mutation-test shows a materially improved doctor.ts score.
  • Surviving mutants that remain are documented as low-value formatting/string mutants or intentionally deferred.
  • No live external services are required by the new tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions