examples/flux-jest/README.md
Being able to unit test stores is critical. This example shows you how to write tests for the TodoMVC stores we created in an earlier example.
cd path/to/flux-jest
npm install
npm run test
The primary differences from the flux-shell project that are necessary to use Jest are:
npm install --save-dev jest babel-jest"jest" property to package.json"test" key in the "scripts" section of package.jsonSetting it up this way will reuse the .babelrc file we already have set up so we can keep using the same syntax in our test files!
Check out the test file and make sure to read through the comments in beforeEach() to get a sense of how and why we set up the test file the way we did.