Skip to content

Improve mutation test coverage for line selection parsing#18

Merged
ferdodo merged 2 commits intoferdodo:masterfrom
sanjeevpenupala:fix/improve-mutation-test-coverage
Mar 9, 2026
Merged

Improve mutation test coverage for line selection parsing#18
ferdodo merged 2 commits intoferdodo:masterfrom
sanjeevpenupala:fix/improve-mutation-test-coverage

Conversation

@sanjeevpenupala
Copy link
Copy Markdown

Summary

  • Add 16 new test cases across checkLegacySyntax.test.ts and parseLineSelector.test.ts to kill 11 survived mutants
  • Covered mutation score rises from 93.42% to 98.25%
  • Remaining 4 survivors are equivalent mutants or unreachable dead code

Details

checkLegacySyntax.test.ts (8 new tests):

  • Inputs without a colon (should not throw)
  • Non-numeric, empty, whitespace-only, and mixed alphanumeric suffixes after colon (should not throw)
  • Legacy syntax variants including single line, spaces in selector, and colon at index 1 (should throw)

parseLineSelector.test.ts (8 new tests):

  • Whitespace-padded selectors and spaces around comma-separated parts
  • Trailing and double commas (empty part handling)
  • Old dash syntax detection with whitespace around parts
  • Negative numbers with leading spaces not falsely flagged as old dash syntax

Test plan

  • All 129 tests pass (vitest run)
  • Full build pipeline passes (npm run build)
  • Mutation score above break threshold (76.98% total, 98.25% covered)

Sanjeev Penupala added 2 commits March 7, 2026 12:01
Add 16 new test cases across checkLegacySyntax and parseLineSelector
to kill 11 survived mutants. Covered mutation score rises from 93.42%
to 98.25%. Remaining 4 survivors are equivalent mutants or dead code.
@ferdodo ferdodo merged commit e464e6c into ferdodo:master Mar 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants