Open melink14 opened 3 years ago
Incremental workaround for pull requests is mentioned here: https://github.com/stryker-mutator/stryker-js/issues/2843
npx stryker run --mutate $(git diff --name-only HEAD $(git merge-base HEAD origin/main) -- "*.ts" ":(exclude)*.spec.ts" | tr '\n' ',' | sed 's/,$//')
https://dev.to/igomezal/setting-up-mutation-testing-with-stryker-and-web-test-runner-3c9p is a web test runner guide which seemed to work.
Using the command runner has some problems since it has no coverage or test knowledge.
Could create a plugin but it seems complicated. :D
Mutation testing is a great way to ensure testing coverage.
For JS it seems only stryker-js exists: https://stryker-mutator.io/docs/stryker-js/getting-started
It can work with karma and typescript and has a dashboard that it can add to your github repo.
Ideally, we'd get incremental reports on Pull Requests but not sure stryker supports that. I guess a dashboard would give a overall score but probably won't want to run it until incremental support works: https://github.com/stryker-mutator/stryker-js/issues/2753