Skip to content

Commit

Permalink
Update Readme for setup file with Jest
Browse files Browse the repository at this point in the history
  • Loading branch information
likethemammal committed Dec 1, 2017
1 parent d60360c commit 840ddd7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/guides/jest.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Using Jest with enzyme

## Configure with Jest

To run the setup file to configure Enzyme and the Adapter with Jest direct `setupTestFrameworkScriptFile` to literally the string `<rootDir>` and the path to your setup file.

```json
{
"jest": {
"setupTestFrameworkScriptFile": "<rootDir>src/setupTests.js"
}
}
```

## Jest version 15 and up

Starting with version 15, Jest [no longer mocks modules by default](https://facebook.github.io/jest/blog/2016/09/01/jest-15.html). Because of this, you no longer have to add _any_ special configuration for Jest to use it with enzyme.
Expand Down

0 comments on commit 840ddd7

Please sign in to comment.