Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

Commit

Permalink
docs: update README.md to include example config\n\nUpdate the README…
Browse files Browse the repository at this point in the history
… to make it a bit more clear how to set up your stryker.conf.js file to run Jest tests, including those that use snapshots.
  • Loading branch information
Liam authored and mthmulders committed Jan 10, 2018
1 parent 2d24af4 commit e347f89
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,30 @@ For all supported version, see the `env` section in [.travis.yml](https://github

## Configuring

For the time being, the Jest runner uses a default configuration.
But pull requests are - obviously - welcome.
The following is an example stryker.conf.js file that will include the tests in your `__tests__` directories and snapshots in your `__snapshots__` directories.

```
module.exports = function(config) {
config.set({
files: [
"src/**/__tests__/*.js",
"src/**/__snapshots__/*.snap",
{
pattern: "src/**/*.js",
mutated: true,
included: false
}
],
testRunner: "jest",
mutator: "javascript",
coverageAnalysis: "off"
});
};
```

For more information on what these options mean, take a look at the [Stryker readme](https://github.com/stryker-mutator/stryker/tree/master/packages/stryker#readme).

For the time being, the Jest runner uses a default configuration for [Jest CLI options](https://facebook.github.io/jest/docs/en/cli.html). But pull requests are - obviously - welcome.

### Loading the plugin

Expand Down

0 comments on commit e347f89

Please sign in to comment.