@stryker-mutator/mocha-framework
TypeScript icon, indicating that this package has built-in type declarations

4.0.0 • Public • Published

Mutation testing badge Build Status NPM Node version Slack Chat

Stryker Mocha Framework

A plugin to speed up Mocha tests in Stryker, the JavaScript mutation testing framework.

This plugin makes it possible for Stryker to use coverageAnalysis: 'perTest', by providing the abstraction to select which individual test(s) to run. You might also be looking for the stryker-mocha-runner, which makes it possible to use the node-based Mocha test runner in stryker.

Install

Install @stryker-mutator/mocha-framework locally within your project folder, like so:

npm i --save-dev @stryker-mutator/mocha-framework

Peer dependencies

The @stryker-mutator/mocha-framework is a plugin to use mocha for stryker as a test framework. As such, you should make sure you have the correct versions of its dependencies installed:

  • @stryker-mutator/core
  • mocha

Configuring

You can either configure the mocha test framework using the command line or by providing it in the stryker.conf.js file. This README describes how to use the stryker.conf.js (or stryker.conf.json) config file:

// stryker.conf.js
module.exports = {
    // ...
    testFramework: 'mocha',
    coverageAnalysis: 'perTest'
    // ...
}

Package Sidebar

Install

npm i @stryker-mutator/mocha-framework

Weekly Downloads

513

Version

4.0.0

License

Apache-2.0

Unpacked Size

40.7 kB

Total Files

6

Last publish

Collaborators

  • strykermutator-npa
  • nicojs
  • archcry
  • simondel