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

Commit

Permalink
Jest docs: Usage with React (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliperelman committed Feb 21, 2017
1 parent b32ad66 commit 296576b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/presets/neutrino-preset-jest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,27 @@ another Neutrino preset for building your application source code.
❯ npm install --save-dev neutrino-preset-jest
```

### Installation: React Testing

Jest is often used in the testing of React components. If you are using this preset in a React application, which most
likely means you are using `neutrino-preset-react`, you should also consider adding React's TestUtils and potentially a
higher-level abstraction such as Airbnb's Enzyme. These should be development dependencies of your project.

#### Yarn

```bash
❯ yarn add --dev react-addons-test-utils enzyme
```

#### npm

```bash
❯ npm install --save-dev react-addons-test-utils enzyme
```

See the [React's Test Utils documentation](https://facebook.github.io/react/docs/test-utils.html) for specifics on React
testing with this approach.

## Project Layout

`neutrino-preset-jest` follows the standard [project layout](/project-layout.md) specified by Neutrino. This
Expand Down

0 comments on commit 296576b

Please sign in to comment.