What it does
StrykerJS is a mutation-testing framework for JavaScript and TypeScript projects. It changes selected parts of production code, runs the project's existing test suite against each mutation, and reports which mutations were detected or survived. The result helps teams find weak assertions or untested behavior; StrykerJS does not write the application's expected behavior or replace its test runner.
Mutation testing asks a different question from coverage: would the tests notice if a small code change introduced a defect? Start in the JavaScript or TypeScript project that already contains the unit tests. The official initializer helps configure StrykerJS and its runner integration; inspect the generated stryker.config.mjs before the first run so the selected source files and test command match the project. Stryker then creates mutants, such as changing a comparison or replacing a return value, and runs the supplied tests against them. A mutant is killed when a test fails; a surviving mutant indicates that the current tests did not catch that particular change. Review the report to decide where a test needs a more meaningful assertion or an additional case. This score is evidence about the supplied tests' sensitivity to those mutations, not proof that the application is defect-free. StrykerJS supports JavaScript and TypeScript projects, including common frameworks, and can work with supported test runners. You provide the codebase, a working test suite, and the project-specific configuration. The framework is open source under Apache 2.0; commands in the official getting-started guide are illustrative.
Strengths
- Reports whether an existing test suite detects targeted source-code mutations, complementing code-coverage measurements.
- The official setup guide uses an initializer to create configuration and supports integration with existing JavaScript test runners.
- StrykerJS documentation lists JavaScript and TypeScript project support, including React, Angular, Vue, Svelte, and Node.js.
Watch out for
- StrykerJS requires a working project test suite and does not supply application-specific assertions; surviving mutants need a developer to interpret and address them.
Best for
- JavaScript or TypeScript teams checking whether unit tests catch small logic changes
- Maintainers improving assertions in an existing test suite rather than measuring only line coverage
Sources
- Stryker Mutator (Oct 25, 2026)
- What is mutation testing? (Oct 25, 2026)
- Getting started - Stryker Mutator (Oct 25, 2026)
- Introduction - StrykerJS (Oct 25, 2026)
- StrykerJS LICENSE (Oct 25, 2026)
