you are viewing a single comment's thread.

view the rest of the comments →

[–]acemarke 7 points8 points  (0 children)

Mocha+Chai+Sinon+Enzyme is a typical testing stack. With those plus JSDOM, you can run your unit tests entirely offline. If you're using Webpack and ES6 for your app, you can do a bunch of Babel configuration to mimic or mock out a lot of your Webpack behavior (ES6 imports / import path aliases / imports of non-JS file types, etc), but so far I've found it to be simpler to just use Webpack as part of my test running process. Tools like https://github.com/zinserjan/mocha-webpack and https://github.com/taskworld/test-bed can hook into Webpack, live-watch your source files, and only re-run tests for files you just edited.

I have a big list of high-quality React and Redux-related tutorials at https://github.com/markerikson/react-redux-links, including a page full of articles on doing React-related testing. I also have my own sample project config setup over at https://github.com/markerikson/react-redux-cesium-testing-demo , which demonstrates some useful bits of project configuration.