Skip to content

Commit

Permalink
Merge pull request basarat#529 from gebeto/patch-1
Browse files Browse the repository at this point in the history
Up to date jest.md
  • Loading branch information
basarat committed Oct 29, 2019
2 parents 158eabf + 5bfddde commit 0c36b24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/testing/jest.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ module.exports = {

// Setup Enzyme
"snapshotSerializers": ["enzyme-to-json/serializer"],
"setupTestFrameworkScriptFile": "<rootDir>/src/setupEnzyme.ts",
"setupFilesAfterEnv": ["<rootDir>/src/setupEnzyme.ts"],
}
```

3. Create `src/setupEnzyme.ts` file.

```js
import { configure } from 'enzyme';
import * as EnzymeAdapter from 'enzyme-adapter-react-16';
import EnzymeAdapter from 'enzyme-adapter-react-16';
configure({ adapter: new EnzymeAdapter() });
```

Expand Down

0 comments on commit 0c36b24

Please sign in to comment.