From 296576bb3ccd83c985f0ff58cc7535e3da9fef21 Mon Sep 17 00:00:00 2001 From: Eli Perelman Date: Tue, 21 Feb 2017 13:05:11 -0600 Subject: [PATCH] Jest docs: Usage with React (#37) --- docs/presets/neutrino-preset-jest/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/presets/neutrino-preset-jest/README.md b/docs/presets/neutrino-preset-jest/README.md index 16a2f0f..1a2d7ad 100644 --- a/docs/presets/neutrino-preset-jest/README.md +++ b/docs/presets/neutrino-preset-jest/README.md @@ -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