Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

stryker-api

stryker-mutator8.2kApache-2.0deprecated0.24.1TypeScript support: included

Stryker v1 is released, but you're still using a 0.x version. This version is no longer maintained. Please use @stryker-mutator/core. See https://stryker-mutator.io/blog/2019-02-13/announcing-stryker-1-0 for the full migration guide.

The api for the extendable JavaScript mutation testing framework Stryker

mutation testing, mutation, testing, test, js, stryker

readme

Build Status Gitter

Stryker

Stryker API

This is the repository for maintaining the API of the Stryker JavaScript mutation testing framework. Plugin creators should depend on this API rather than on the main Stryker repository directly.

Extension use cases

You can extend Stryker in a number of ways.

  1. Create your own Mutator
  2. Create a custom Reporter
  3. Create a TestFramework for a test framework
  4. Create a TestRunner to bridge the gap between your test runner and Stryker
  5. Create a custom way of configuring Stryker by creating a ConfigEditor

All extension points work in the same basic way.

  1. Create a constructor function (or class)
  2. Register the constructor function to the correct Factory.

More info comming soon. In the mean time, take a look at the Stryker homepage.

changelog

Change Log

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

0.24.1 (2019-02-12)

Bug Fixes

  • mutants: Prevent memory leak when transpiling mutants (#1376) (45c2852), closes #920

0.24.0 (2019-02-08)

Features

  • config-editors: Remove side effects from all config editor plugins (#1317) (1f61bed)
  • dependency injection: Add dependency injection for plugins (#1313) (f90cd56), closes #667
  • port: Deprecate property 'port' (#1309) (2539ee0)
  • test-frameworks: Remove side effects from all test-framework plugins (#1319) (a7160f4)
  • transpilers: Remove side effects transpiler plugins (#1351) (9a8b539)

0.23.0 (2018-12-23)

Features

  • zero config: Support mutation testing without any configuration (#1264) (fe8f696)

0.22.1 (2018-12-12)

Note: Version bump only for package stryker-api

0.22.0 (2018-11-29)

Bug Fixes

  • JestTestRunner: run jest with --findRelatedTests (#1235) (5e0790e)

Features

  • console-colors: Add a global config option to enable/disable colors in console (#1251) (19b1d64)

0.21.5 (2018-11-13)

Bug Fixes

  • missing mutator plugin: set the correct plugin name when the specified mutator cannot be found (#1234) (c2465ec), closes #1161

0.21.4 (2018-10-15)

Bug Fixes

  • any-promise: Don't register a promise implementation (#1180) (1d3e2f6)
  • version: Version bump for failed release (8cf9e87)

0.21.2 (2018-10-03)

Note: Version bump only for package stryker-api

0.21.1 (2018-09-14)

Note: Version bump only for package stryker-api

0.21.0 (2018-08-21)

Features

  • stryker config: rename config setting timeoutMs to timeoutMS (#1099) (3ded998), closes #860

0.20.0 (2018-08-19)

Features

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

0.19.0 (2018-08-17)

Features

0.18.0 (2018-07-20)

Bug Fixes

Features

0.17.3 (2018-07-04)

Note: Version bump only for package stryker-api

0.17.2 (2018-05-31)

Note: Version bump only for package stryker-api

0.17.1 (2018-05-21)

Note: Version bump only for package stryker-api

0.17.0 (2018-04-30)

Features

BREAKING CHANGES

  • node version: Node 4 is no longer supported.

0.16.1 (2018-04-20)

Note: Version bump only for package stryker-api

0.16.0 (2018-04-11)

Features

  • Sandbox isolation: symbolic link node_modules in sandboxes (#689) (487ab7c)

0.15.0 (2018-04-04)

Features

  • Detect files: create File class (1a89c10)
  • test runner: add hooks file to test run api (97be399)
  • Transpiler api: change return type of transpile to a file array (e713416)

BREAKING CHANGES

  • test runner: * Promises return types should be Promise<void> instead of Promise<any> (typescript compiler error).
  • Detect files: Remove the InputFileDescriptor interface (breaking for typescript compiler)

0.14.0 (2018-03-22)

Features

  • stryker: add excludedMutations as a config option (#13) (#652) (cc8a5f1)

0.13.1 (2018-03-21)

Note: Version bump only for package stryker-api

0.13.0 (2018-02-07)

Features

  • coverage analysis: Support transpiled code (#559) (7c351ad)

0.12.0 (2017-12-21)

Features

0.11.0 (2017-10-24)

Features

  • transpiler api: Async transpiler plugin support (#433) (794e587)

0.10.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.9.0 (2017-09-19)

Features

  • typescript: Add support for TypeScript mutation testing (#376) (ba78168)

BREAKING CHANGES

  • typescript: * Hoist the Mutator interface to a higher abstraction. With this interface it was possible to add mutators for specific ES5 AST nodes. As we're moving away from ES5, this plugin abstraction had to be hoisted to a higher level. It is no longer possible to plugin a specific ES5 node mutator.
  • Update report interface: Rename MutantState.Error => MutantState.RuntimeError.

0.8.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.7.0 (2017-08-11)

Features

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

0.6.0 (2017-08-04)

Features

  • html-reporter: Score result as single source of truth (#341) (47b3295), closes #335

0.5.6 (2017-07-14)

Bug Fixes

  • ts-2.4: Fix type issues for typescript 2.4 (#337) (c18079b), closes #337

0.5.5 (2017-06-16)

Bug Fixes

  • npmignore: Align npm ignores (#321) (db2a56e)
  • Manual version bump (a67d90b)

0.5.2 (2017-06-08)

0.5.1 (2017-06-02)

Features

  • report-score-result: Report score result as tree (#309) (965c575)

0.5.0 (2017-04-21)

Bug Fixes

  • package.json: Use stryker repo url (#266) (de7d1cd)

Features

  • multi-package: Migrate to multi-package repo (#257) (0c2fde5)

0.4.2 (2016-12-30)

Bug Fixes

Features

0.4.1 (2016-11-30)

Features

  • es2015-promise: Remove dep to es6-promise (#11) (7042381)

0.4.0 (2016-11-20)

Features

  • configurable-concurrency: Add setting for maxConcurrentTestRunners (731a05b)
  • configurable-concurrency: Default value (32abab2)
  • mutant-status: Add Error to MutantStatus (#7) (e9df479)
  • new-api: Allow for one-pass coverage/test (#6) (d42c3c7)

0.2.1 (2016-10-03)

0.3.0-0 (2016-09-30)

  • 0.3.0-0 (e73cbba)
  • feat(ts-2): Upgrade to typescript 2 (#5) (88a4254)

0.2.0 (2016-07-21)

  • 0.2.0 (3410831)
  • docs(readme): Add mutator to the list of extensions (7cef4bd)

0.1.2 (2016-07-18)

  • 0.1.2 (52f330c)
  • feat(include-comments): Include comments in d-ts files (#2) (0d2279e)
  • feat(unincluded-files): Add include boolean (#3) (32d7cdf)

0.1.1 (2016-07-15)

  • 0.1.1 (e5f039d)
  • feat(testRunner): Add lifecycle events. (#1) (94e61c7)

0.1.0 (2016-07-01)

0.0.2 (2016-06-09)

  • docs(build) Add travis build file (6a7acdb)
  • docs(readme) Add stryker logo (66d45db)
  • fix(TestRunner) Replace TestRunner base class with interface (8507b89)
  • Initial commit - Basic copy from stryker-mutator/stryker (e9818e5)
  • Initial version of the stryker-api (f7bb9c2)
  • refactor(Factory) Fix typo in error message (70eec6c)
  • refactor(package.json) Remove unused dependencies (b9ba1a4)
  • refactor(report) Rename spec to test as it is more logical in the context of a test report. (9396c98)
  • test(integration) Add a lot of integration tests (ed24290)