Kent C. Dodds
1 wife, 3 kids
with Mocha, Enzyme, and Chai
What this talk is
- Some contrived examples
- Live coding
- Suggestions and recommendations
What this talk is not
- Everything there is to know about Mocha
- Everything there is to know about Enzyme
- Everything there is to know about React
What are these things?
chai-enzyme: Chai.js assertions for enzyme.
Sinon: Standalone test spies, stubs, and mocks for JS.
sinon-chai: Chai.js assertions for sinon.
Four inputs to React Components
$ git clone https://github.com/kentcdodds/react-mocha-workshop.git
$ cd react-mocha-workshop
$ git checkout start
$ npm install
Now open the INSTRUCTIONS.md up in your favorite editor...
Let's get set up
Testing React with Mocha, Enzyme, and Chai
By Kent C. Dodds