stryker-jasmine-runnerdeprecated

A plugin to use the Jasmine (NodeJS) test runner in Stryker, the mutation testing framework for JavaScript and friends

Usage no npm install needed!

<script type="module">
  import strykerJasmineRunner from 'https://cdn.skypack.dev/stryker-jasmine-runner';
</script>

README

Build Status NPM Node version Gitter

Stryker Jasmine Runner

A plugin to use Jasmine as a test runner for node in Stryker, the JavaScript mutation testing framework.

Install

Install stryker-jasmine-runner locally within your project folder, like so:

npm i --save-dev stryker-jasmine-runner

Peer dependencies

The stryker-jasmine-runner is a plugin for stryker to enable jasmine as a test runner. As such, you should make sure you have the correct versions of its dependencies installed:

  • jasmine
  • stryker-api

Configuring

You can configure the jasmine test runner in the stryker.conf.js file.

// stryker.conf.js
module.exports = function (config) {
    config.set({
        // ...
        // not required, but boosts performance
        coverageAnalysis: 'perTest', 
        // not required, but will allow you to use coverageAnalysis "perTest". Note: This requires `stryker-jasmine` to also be installed.
        testFramework: 'jasmine', 
        testRunner: 'jasmine',
        jasmineConfigFile: 'spec/support/jasmine.json'
        // ...
    });
}

jasmineConfigFile [string]

Default: undefined

Specify your jasmine configuration file to be loaded. Leaving this blank will result in the jasmine defaults, which are undocumented (see source code here).