Skip to content
This repository was archived by the owner on Apr 11, 2019. It is now read-only.

Commit ba1167a

Browse files
authored
Chore: update readme.md with testing instructions
1 parent b4dcbe5 commit ba1167a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,24 @@ export {
163163
### Configuring your own generators
164164
For information on how to build your own generators with relative ease, please go to the [Plop Microgenerator](https://github.com/amwmedia/plop) homepage for detailed instructions.
165165

166+
## Testing
167+
Included in the setup is a test suite that will run your tests in the browser using Karma. A number of testing utilities are included, including
168+
- Expect (Plus Expect-JSX)
169+
- Mocha
170+
- Chai (JSX and Immutable)
171+
- Enzyme
172+
- Karma (including multiple Karma plugins)
173+
174+
You can see examples for testing of React Components, Redux Action Creators and Reducers in the repository [here](https://github.com/RyanCCollins/scalable-react-boilerplate/tree/master/app/src/containers/FeatureFirstContainer/tests). Please follow the convention of naming tests with a .test.js postfix, or else the test suite will not recognize your tests.
175+
176+
To run tests, you will run
177+
```js
178+
npm run test
179+
```
180+
181+
which will pick up any file with the .test.js postfix and run it through Karma / Mocha, printing a report to the commandline.
182+
183+
166184
## Technologies / Libraries
167185

168186
- [Node](https://nodejs.org/en/) - JS runtime environment
@@ -186,6 +204,7 @@ For information on how to build your own generators with relative ease, please g
186204
- [Mocha](http://mochajs.org/) - unit tests
187205
- [jsdom](https://github.com/tmpvar/jsdom) - vdom to test React without browser
188206
- [Expect](https://github.com/mjackson/expect) - assertion library
207+
- [Enzyme](https://github.com/airbnb/enzyme) - React Testing utils for rendering of components
189208
- [Chai / Immutable](http://chaijs.com/) - assertion library for Immutable JS
190209
- A bunch of useful scripts
191210

0 commit comments

Comments
 (0)