Package detail

@stryker-mutator/mocha-framework

stryker-mutator4.1kApache-2.04.0.0

A plugin to use the mocha test framework in Stryker, the JavaScript mutation testing framework

stryker, mocha, @stryker-mutator/test-framework-plugin, @stryker-mutator/mocha-runner

readme

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'
    // ...
}

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

4.0.0 (2020-10-07)

Note: Version bump only for package @stryker-mutator/mocha-framework

4.0.0-beta.10 (2020-10-05)

Note: Version bump only for package @stryker-mutator/mocha-framework

4.0.0-beta.9 (2020-09-30)

Note: Version bump only for package @stryker-mutator/mocha-framework

4.0.0-beta.8 (2020-09-22)

Note: Version bump only for package @stryker-mutator/mocha-framework

4.0.0-beta.7 (2020-09-17)

Note: Version bump only for package @stryker-mutator/mocha-framework

4.0.0-beta.6 (2020-09-10)

Note: Version bump only for package @stryker-mutator/mocha-framework

4.0.0-beta.5 (2020-09-09)

Note: Version bump only for package @stryker-mutator/mocha-framework

4.0.0-beta.4 (2020-08-29)

Note: Version bump only for package @stryker-mutator/mocha-framework

4.0.0-beta.3 (2020-08-19)

Note: Version bump only for package @stryker-mutator/mocha-framework

4.0.0-beta.2 (2020-08-07)

Note: Version bump only for package @stryker-mutator/mocha-framework

4.0.0-beta.1 (2020-07-17)

Note: Version bump only for package @stryker-mutator/mocha-framework

4.0.0-beta.0 (2020-07-10)

Features

  • test-framework: remove TestFramework API (fe5e200)

3.3.1 (2020-07-04)

Note: Version bump only for package @stryker-mutator/mocha-framework

3.3.0 (2020-06-16)

Note: Version bump only for package @stryker-mutator/mocha-framework

3.2.4 (2020-05-18)

Note: Version bump only for package @stryker-mutator/mocha-framework

3.2.3 (2020-05-15)

Note: Version bump only for package @stryker-mutator/mocha-framework

3.2.2 (2020-05-15)

Note: Version bump only for package @stryker-mutator/mocha-framework

3.2.1 (2020-05-15)

Note: Version bump only for package @stryker-mutator/mocha-framework

3.2.0 (2020-05-13)

Note: Version bump only for package @stryker-mutator/mocha-framework

3.1.0 (2020-03-29)

Features

3.0.2 (2020-03-13)

Bug Fixes

  • nodejs requirement: set NodeJS requirement to at least Node 10 (8c08059)

3.0.1 (2020-03-12)

Bug Fixes

3.0.0 (2020-03-11)

Bug Fixes

Features

  • Initializer: Initialize config file as JSON by default (#2093) (e07d953), closes #2000

2.5.0 (2020-01-12)

Note: Version bump only for package @stryker-mutator/mocha-framework

2.4.0 (2019-11-24)

Note: Version bump only for package @stryker-mutator/mocha-framework

2.3.0 (2019-11-13)

Note: Version bump only for package @stryker-mutator/mocha-framework

2.2.1 (2019-11-06)

Note: Version bump only for package @stryker-mutator/mocha-framework

2.2.0 (2019-11-06)

Note: Version bump only for package @stryker-mutator/mocha-framework

2.1.0 (2019-09-08)

Note: Version bump only for package @stryker-mutator/mocha-framework

2.0.2 (2019-07-11)

Note: Version bump only for package @stryker-mutator/mocha-framework

2.0.1 (2019-07-02)

Note: Version bump only for package @stryker-mutator/mocha-framework

2.0.0 (2019-05-17)

Features

BREAKING CHANGES

  • node 6: support for Node 6 has been dropped. Node 8 or higher is now required.

1.3.1 (2019-04-26)

Note: Version bump only for package @stryker-mutator/mocha-framework

1.3.0 (2019-04-24)

Features

1.2.0 (2019-04-02)

Note: Version bump only for package @stryker-mutator/mocha-framework

1.1.1 (2019-03-21)

Note: Version bump only for package @stryker-mutator/mocha-framework

1.1.0 (2019-03-04)

Note: Version bump only for package @stryker-mutator/mocha-framework

1.0.3 (2019-02-26)

Note: Version bump only for package @stryker-mutator/mocha-framework

1.0.2 (2019-02-13)

Bug Fixes

  • stryker init: update metadata for stryker init command (#1403) (38f269b), closes #1402

1.0.1 (2019-02-13)

Note: Version bump only for package @stryker-mutator/mocha-framework

1.0.0 (2019-02-13)

Features

  • rename: rename stryker-xxx-xxx -> [@stryker-mutator](https://github.com/stryker-mutator)/xxx-xxx (1bbd6ff)

BREAKING CHANGES

  • rename: The core package and plugins have been renamed: stryker-mocha-framework -> @stryker-mutator/mocha-framework

0.15.1 (2019-02-12)

Note: Version bump only for package stryker-mocha-framework

0.15.0 (2019-02-08)

Features

  • test-frameworks: Remove side effects from all test-framework plugins (#1319) (a7160f4)
  • test-runner: Use new plugin system to load TestRunner plugins (#1361) (266247b)

0.14.0 (2018-12-23)

Features

0.13.3 (2018-12-12)

Note: Version bump only for package stryker-mocha-framework

0.13.2 (2018-11-29)

Bug Fixes

  • stryker-api: Update stryker-api peer dependency version (677fc28)

0.13.1 (2018-11-29)

Note: Version bump only for package stryker-mocha-framework

0.13.0 (2018-11-13)

Features

  • mocha-runner: use default mocha.opts file, support relative imports (#1237) (2711c2b), closes #1046

0.12.5 (2018-10-15)

Bug Fixes

  • version: Version bump for failed release (8cf9e87)

0.12.3 (2018-10-03)

Note: Version bump only for package stryker-mocha-framework

0.12.2 (2018-09-14)

Note: Version bump only for package stryker-mocha-framework

0.12.1 (2018-08-21)

Note: Version bump only for package stryker-mocha-framework

0.12.0 (2018-08-19)

Features

  • stryker config: rename config setting reporter to reporters (#1088) (584218a), closes #793

0.11.2 (2018-08-17)

Bug Fixes

  • dependencies: support stryker-api 0.19.0 (#1087) (44ce923)

0.11.1 (2018-08-17)

Note: Version bump only for package stryker-mocha-framework

0.11.0 (2018-07-20)

Bug Fixes

Features

0.10.3 (2018-07-04)

Note: Version bump only for package stryker-mocha-framework

0.10.2 (2018-05-31)

Note: Version bump only for package stryker-mocha-framework

0.10.1 (2018-05-21)

Note: Version bump only for package stryker-mocha-framework

0.10.0 (2018-04-30)

Features

BREAKING CHANGES

  • node version: Node 4 is no longer supported.

0.9.2 (2018-04-20)

Note: Version bump only for package stryker-mocha-framework

0.9.1 (2018-04-11)

Bug Fixes

0.9.0 (2018-04-04)

Note: Version bump only for package stryker-mocha-framework

0.8.6 (2018-03-22)

Bug Fixes

  • peerDependency: update stryker-api requirement to ^0.14.0 (3ce04d4)

0.8.5 (2018-03-22)

Note: Version bump only for package stryker-mocha-framework

0.8.4 (2018-03-21)

Note: Version bump only for package stryker-mocha-framework

0.8.3 (2018-02-07)

Bug Fixes

  • dependencies: update stryker-api requirement to ^0.13.0 (8eba6d4)

0.8.2 (2018-02-07)

Note: Version bump only for package stryker-mocha-framework

0.8.1 (2018-01-19)

Note: Version bump only for package stryker-mocha-framework

0.8.0 (2018-01-12)

Features

  • stryker-mocha-framework: Support mocha in karma (#567) (ca389e5)

0.7.2 (2017-12-21)

Note: Version bump only for package stryker-mocha-framework

0.7.1 (2017-11-27)

Note: Version bump only for package stryker-mocha-framework

0.7.0 (2017-11-13)

Features

  • mocha 4: Add support for mocha version 4 (#455) (de6ae4f)

0.6.1 (2017-10-24)

Note: Version bump only for package stryker-mocha-framework

0.6.0 (2017-10-20)

Bug Fixes

  • mocha framework: Select tests based on name (#413) (bb7c02f), closes #249

BREAKING CHANGES

  • mocha framework: * Change api of TestFramework. It now provides an array of TestSelection objects, instead of an array of numbers with test ids.

0.5.1 (2017-10-10)

Note: Version bump only for package stryker-mocha-framework

0.5.0 (2017-09-19)

0.4.0 (2017-08-25)

Code Refactoring

  • change ConfigWriter interface name to ConfigEditor (#357) (ec4ae03)

BREAKING CHANGES

  • Public api for ConfigWriter is renamed to ConfigEditor. The corresponding write method is renamed to edit. If you're using custom ConfigWriter plugins you should rename the write method to edit. Please update the stryker-mocha-framework and stryker-karma-runner to the latest versions as they provide the new ConfigEditor plugin.

0.3.0 (2017-08-11)

Features

  • ci-integration: Configurable thresholds based on mutation score (#355) (93f28cc), closes #220

0.2.0 (2017-08-04)

0.1.4 (2017-07-14)

0.1.3 (2017-06-16)

Bug Fixes

  • npmignore: Align npm ignores (#321) (db2a56e)

0.1.1 (2017-06-08)

0.4.0 (2017-06-02)

Bug Fixes

  • deps: Add stryker-api as peerDependency (8b01a66)
  • deps: Add typings as dev-dependency (4ee866a)
  • deps: Fix peer dependency version for mocha (780ca90)
  • deps: Remove unused dependency (121a549)
  • deps: Remove unused dependency (1f6dbba)
  • deps: Set version of stryker api (49a1384)
  • deps: Update out dated dependencies (cc0be9a)
  • deps: Update outdated dependencies (0fc17be)
  • deps: Update version stryker-api (3a1a36c)
  • index: Add file which loads the TestRunner (55fd132)
  • package.json: Use most recent major versions (#296) (57236d8)
  • TestRunner: Add try-catch (0c41fbf)
  • tsconfig: Extend base tsconfig and don't exclude typings folder (#298) (622170b)
  • tslint: Add linting (9c360b2)

Features

  • es2015-promise: Remove dep to es6-promise (#5) (6f38885)
  • mocha-framework: Move mocha test framework to seperate package (#308) (ae0074e) *one-pass-coverage: Update test runner (#4) (6716519)
  • ts2: Migrate to typescript 2 (0c9a655)
  • unincluded-files: Support unincluded files (80297bc)

BREAKING CHANGES

  • mocha-framework: Users with testRunner: "mocha",testFramework: "mocha" should now also install "stryker-mocha-framework".

0.1.0 (2017-06-02)

Features

  • mocha-framework: Move mocha test framework to seperate package (#308) (ae0074e)

BREAKING CHANGES

  • mocha-framework: Users with testRunner: "mocha",testFramework: "mocha" should now also install "stryker-mocha-framework".