Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stryker-mutator/core

Package Overview
Dependencies
Maintainers
0
Versions
100
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

  • 8.6.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
129K
increased by7.61%
Maintainers
0
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

FAQs

Package last updated on 29 Sep 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc