Skip to content

test(settings): coverage-save snapshot tests miss two mutants #551

Closed

Description

@cristim

Summary

The settings coverage-save tests added in #538 leave mutants alive, and one branch is dead code.

Location (origin/main 5659f3b)

  • frontend/src/settings.ts saveGlobalSettings (~3525-3625). Reported in review as surviving the suite: (a) the card snapshot (savedSnapshot[field.coverageId], ~3619) updated even when the service PUT fails; (b) the global snapshot (savedSnapshot['setting-default-coverage'], ~3538) refreshed before the global PUT resolves. Neither mutation fails a test. (Not re-run for this issue; the mutations come from the review.)
  • Dead ternary at ~3560: defaultCoverageChanged ? settings.default_coverage : (base?.coverage ?? settings.default_coverage). After the global PUT, loadedServiceConfigs is already remapped to settings.default_coverage (~3539), so base?.coverage equals it whenever defaultCoverageChanged is true and the ternary adds nothing.

Not filed here

Empty global coverage still passing 0 in frontend/src/plans.ts:1345 and no inline error from wireInlineRangeValidation (settings.ts:247) are already described in open #522.

Context

Found in the #538 review. Related: #522, #539.

Acceptance

Tests fail when the card snapshot is updated after a failed service PUT and when the global snapshot is refreshed before its PUT resolves, and the redundant ternary is removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions