Skip to content

test: add mutation testing (Stryker) for parser modules #6

@TechPMRyan

Description

@TechPMRyan

Summary

The parser modules — extractControllers, extractServices, extractModules, extractModels — are the core of Tracer. Line coverage tells us the tests ran the code. Mutation testing tells us the tests would actually catch a regression. Without a mutation score, we cannot say with confidence that the test suite protects against changes that silently break parser output.

What needs to happen

  • Install and configure Stryker for TypeScript (@stryker-mutator/core, @stryker-mutator/typescript-checker, @stryker-mutator/vitest-runner)
  • Run mutation testing against src/parser/nestjs/ — all four extractor modules
  • Establish a minimum acceptable mutation score (target: 75%+ as a starting baseline)
  • Add a test:mutation script to package.json
  • Document any surviving mutants that represent acceptable gaps

Why this matters

The parser is what engineers stake deployment decisions on. If a change breaks joinPaths, or the wrong decorator name check, or dependency extraction logic — and the test suite still passes — that is a trust problem. Mutation testing makes that gap visible before it ships.

Acceptance criteria

  • Stryker configured and running against src/parser/nestjs/
  • Mutation score reported per module
  • Minimum score threshold enforced (fail if below target)
  • test:mutation script added to package.json
  • Any surviving mutants reviewed and either fixed or explicitly documented as acceptable

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions