🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@stryker-mutator/core

Package Overview
Dependencies
Maintainers
4
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stryker-mutator/core

The extendable JavaScript mutation testing framework

9.0.1
latest
Source
npm
Version published
Weekly downloads
150K
6.95%
Maintainers
4
Weekly downloads
 
Created

What is @stryker-mutator/core?

@stryker-mutator/core is a mutation testing framework for JavaScript and TypeScript projects. It helps developers improve their test suites by introducing small changes (mutations) to the code and checking if the existing tests can detect these changes. If a test fails due to a mutation, it means the test suite is effective in catching potential bugs.

What are @stryker-mutator/core's main functionalities?

Mutation Testing

This code demonstrates how to set up and run mutation testing using Stryker. It configures Stryker to mutate JavaScript files in the 'src' directory, use Jest as the test runner, and generate reports in HTML and clear-text formats.

const { Stryker } = require('@stryker-mutator/core');
const stryker = new Stryker({
  mutate: ['src/**/*.js'],
  testRunner: 'jest',
  reporters: ['html', 'clear-text'],
  coverageAnalysis: 'off'
});
stryker.runMutationTest().then(() => console.log('Mutation testing completed.'));

Configuration

This is a sample Stryker configuration file. It specifies which files to mutate, the test runner to use, the reporters for output, and other settings. This configuration is essential for customizing how Stryker runs mutation tests.

module.exports = {
  mutate: ['src/**/*.js'],
  mutator: 'javascript',
  packageManager: 'npm',
  reporters: ['progress', 'clear-text', 'html'],
  testRunner: 'jest',
  transpilers: [],
  testFramework: 'jest',
  coverageAnalysis: 'off'
};

Other packages similar to @stryker-mutator/core

Keywords

mutation testing

FAQs

Package last updated on 14 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts