8.2.6 • Published 2 months ago

@stryker-mutator/core v8.2.6

Weekly downloads
28,187
License
Apache-2.0
Repository
github
Last release
2 months ago

Mutation testing badge Build Status NPM Node version Slack Chat

StrykerJS

StrykerJS

Professor X: For someone who hates mutants... you certainly keep some strange company. William Stryker: Oh, they serve their purpose... as long as they can be controlled.

Introduction

For an introduction to mutation testing and StrykerJS features, see stryker-mutator.io.

Getting started

Please follow the quickstart on the website.

For small js projects, you can try the following command:

npm install --save-dev @stryker-mutator/core
# Only for small projects:
npx stryker run

It will run stryker with default values:

  • Uses npm test as your test command
  • Searches for files to mutate in the lib and src directories

Usage

$ npx stryker <command> [options] [configFile]

See usage on stryker-mutator.io

Supported mutators

See our website for the list of currently supported mutators.

Configuration

See configuration on stryker-mutator.io.

Programmatic use

Stryker can also be used programmatically from nodejs. It exports 2 classes for you to use: Stryker and StrykerCli.

import { Stryker, StrykerCli } from '@stryker-mutator/core';

Both classes can be used to run Stryker. The main difference is that Stryker is a slightly more low-level approach, while StrykerCli is the straight up CLI api.

In this example you can see how to use both.

async function main() {
  // Runs Stryker as if it was called directly from the cli. Not even returns a promise, it assumes to be allowed to call `process.exit`.
  new StrykerCli(process.argv /* RAW argv array */ ).run(); 

  // Runs Stryker, will not assume to be allowed to exit the process.
  const stryker = new Stryker({ concurrency: 4 } /* Partial Stryker options object */ );
  const mutantResults = await stryker.runMutationTest();
  // mutantResults or rejected with an error.
}

Stryker is written in TypeScript, so it is recommended to use Typescript as well to get the best developer experience.

8.2.6

2 months ago

8.2.5

2 months ago

8.2.4

2 months ago

8.2.3

3 months ago

8.2.2

3 months ago

8.1.0

3 months ago

8.2.1

3 months ago

7.3.0

7 months ago

7.1.1

10 months ago

7.2.0

7 months ago

8.0.0

5 months ago

7.1.0

10 months ago

7.0.2

11 months ago

7.0.0

11 months ago

7.0.1

11 months ago

6.4.2

1 year ago

6.4.1

1 year ago

6.4.0

1 year ago

6.3.1

1 year ago

6.4.0-beta.3

1 year ago

6.4.0-beta.2

1 year ago

6.3.0

1 year ago

6.2.3

2 years ago

6.2.1

2 years ago

6.2.0

2 years ago

6.2.2

2 years ago

6.1.2

2 years ago

6.2.0-beta.0

2 years ago

6.0.1

2 years ago

6.0.0

2 years ago

6.0.2

2 years ago

6.0.0-beta.0

2 years ago

5.6.1

2 years ago

5.6.0

2 years ago

5.5.1

2 years ago

5.5.0

2 years ago

5.4.1

3 years ago

5.4.0

3 years ago

5.3.0

3 years ago

5.2.3

3 years ago

5.2.2

3 years ago

5.2.1

3 years ago

5.2.0

3 years ago

5.1.1

3 years ago

5.1.0

3 years ago

5.0.1

3 years ago

5.0.0

3 years ago

4.6.0

3 years ago

4.5.1

3 years ago

4.5.0

3 years ago

4.4.1

3 years ago

4.4.0

3 years ago

4.3.1

3 years ago

4.2.0

3 years ago

4.1.2

3 years ago

4.1.1

3 years ago

4.1.0

3 years ago

4.0.0

4 years ago

4.0.0-beta.10

4 years ago

4.0.0-beta.9

4 years ago

4.0.0-beta.8

4 years ago

4.0.0-beta.7

4 years ago

4.0.0-beta.6

4 years ago

4.0.0-beta.5

4 years ago

4.0.0-beta.4

4 years ago

4.0.0-beta.3

4 years ago

4.0.0-beta.2

4 years ago

4.0.0-beta.1

4 years ago

4.0.0-beta.0

4 years ago

3.3.1

4 years ago

3.3.0

4 years ago

3.2.4

4 years ago

3.2.2

4 years ago

3.2.1

4 years ago

3.2.3

4 years ago

3.1.0

4 years ago

3.0.2

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.5.0

4 years ago

2.4.0

4 years ago

2.3.0

4 years ago

2.2.1

4 years ago

2.1.0

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago