Find slides here
This project assumes you have NodeJS v6 or greater installed. It's also recommended to use the
yarn client (rather than npm). If you'd rather stick with
that's fine. Just replace
npm in the instructions below and hope that things don't break
With that, run:
git clone https://github.com/kentcdodds/react-jest-workshop.git cd react-jest-workshop yarn run setup
yarn run setup script finishes without errors (don't worry about warnings) then you're good to go. Otherwise,
please file an issue.
There are two directories in this project that you should be interested in:
exercises: Where the unfinished tests are (where you should add your tests).
exercises-final: Where the finished tests are (where you can reference if you get stuck).
The tests in
exercises are actually all scaffolded for you. So your goal is to go through and write all the tests. Do this:
yarn run watch:testwhich will start running the tests in watch mode, meaning that as you save your file, it will automatically re-run your tests so you can quickly see how you're doing.
- Choose a file in the
exercisesdirectory that ends in
.test.jsand implement the tests one-by-one.