DEV.co
Open-Source Testing · stryker-mutator

stryker-js

Stryker-js is a mutation testing tool for JavaScript and TypeScript that validates test quality by introducing intentional code changes (mutations) and checking if tests catch them. It helps teams identify weak tests and improve overall test coverage effectiveness.

Source: GitHub — github.com/stryker-mutator/stryker-js
2.9k
GitHub stars
268
Forks
TypeScript
Primary language
Apache-2.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositorystryker-mutator/stryker-js
Ownerstryker-mutator
Primary languageTypeScript
LicenseApache-2.0 — OSI-approved
Stars2.9k
Forks268
Open issues69
Latest releasev9.6.1 (2026-04-10)
Last updated2026-07-06
Sourcehttps://github.com/stryker-mutator/stryker-js

What stryker-js is

Stryker-js is a monorepo-based mutation testing framework written in TypeScript that integrates with existing test runners, applies syntactic mutations to source code, and measures test suite effectiveness by counting mutations killed vs. survived. It supports multiple mutators and configurable test commands.

Quickstart

Get the stryker-js source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/stryker-mutator/stryker-js.gitcd stryker-js# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Quality Gate for Test Suites

Use Stryker-js in CI/CD pipelines to enforce mutation score thresholds, ensuring test suites are not just passing but actually validating code behavior changes.

Test Coverage Improvement

Identify weak or incomplete test cases by analyzing which mutations survive, then refactor tests to catch real bugs and edge cases.

JavaScript/TypeScript Projects with Mature Test Suites

Best suited for mid-to-large projects already using npm test or standard test runners where mutation testing ROI justifies the additional CI runtime.

Implementation considerations

  • Configure test command and file globs (lib/src defaults) to match your project layout; misconfigurations will cause failed mutation runs.
  • Expect initial CI overhead: mutation testing can multiply test execution time; plan staged rollout or use baseline runs to measure impact.
  • Review supported mutators against your code patterns; custom mutators or unsupported language features may limit mutation coverage.
  • Establish mutation score targets and decision rules (e.g., fail CI if score < 80%) before rolling out to the team.
  • Use the Stryker dashboard or badge integration to track mutation score trends over time.

When to avoid it — and what to weigh

  • No Established Test Suite — Mutation testing requires a working test runner and existing tests; it does not replace writing tests initially.
  • Severely Time-Constrained CI Pipelines — Mutation testing is computationally expensive; projects with strict CI time budgets may find the overhead impractical without selective mutation strategies.
  • Legacy Projects with Fragile or Flaky Tests — Unreliable test suites will produce unreliable mutation scores, making the tool's insights less actionable.
  • Absence of Mutation Testing Expertise — Teams unfamiliar with mutation testing concepts may struggle to interpret results and act on them; training investment is required.

License & commercial use

Licensed under Apache License 2.0 (Apache-2.0), a permissive OSI-approved license.

Apache 2.0 permits commercial use, modification, and distribution with proper attribution and patent clause compliance. No commercial restrictions detected in the license text; however, always review license terms in your specific legal context, especially regarding patent indemnification if using for large-scale commercial deployments.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationStrong
License clarityClear
Deployment complexityLow
DEV.co fitGood
Assessment confidenceHigh
Security considerations

Stryker-js executes test code and introduces mutations into source; it runs in trusted environments (CI/CD, local development). No security claims made; treat it as a dev-only tool and do not run on untrusted input. Ensure dependencies and the tool itself are regularly updated. No vulnerability data provided in source data.

Alternatives to consider

Mutant (Rust/alternative ecosystems)

Language-specific alternative for non-JavaScript projects; different architecture and performance characteristics.

Pit (Java)

Mature mutation testing tool for JVM ecosystems; not applicable to JavaScript but a reference implementation in the mutation testing space.

Jest coverage reports (code coverage only)

Simpler metric that does not validate test effectiveness; mutation testing is more rigorous but at higher cost.

Software development agency

Build on stryker-js with DEV.co software developers

Try Stryker-js in your next project build to uncover weak tests and enforce mutation score thresholds in CI/CD. See our quickstart guide at stryker-mutator.io.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

stryker-js FAQ

Will mutation testing replace code coverage metrics?
No. Code coverage measures which lines are executed; mutation testing measures whether tests *detect* changes. Both are complementary; mutation testing is a higher-bar quality gate.
How much does mutation testing slow down CI?
Depends on test suite size and mutation count. Expect 2–10× longer CI times. Use incremental runs, baseline strategies, or selective mutations to manage overhead.
Can Stryker-js work with monorepos?
Yes. The Stryker-js repo itself is a monorepo; it supports pnpm workspaces. Configure separate stryker.conf.js files or use root-level configuration with file globs.
What if my test runner is not listed in the docs?
Stryker-js invokes npm test by default; if your runner is the default in package.json scripts, it should work. Custom test commands can be configured.

Work with a software development agency

From first prototype to production, DEV.co delivers software development services around tools like stryker-js. Our software development agency staffs experienced software developers and web developers for custom software development, web development, integrations, and ongoing support across open-source testing and beyond.

Ready to Level Up Your Test Suite Quality?

Try Stryker-js in your next project build to uncover weak tests and enforce mutation score thresholds in CI/CD. See our quickstart guide at stryker-mutator.io.