dvdzkwsk / react-redux-starter-kit

Get started with React, Redux, and React-Router.
MIT License
10.28k stars 2.2k forks source link

Unit testing with Jest #1224

Open leimonio opened 7 years ago

leimonio commented 7 years ago

Jest seems a really nice solution as far as testing both components and redux parts (action creators, reducers, etc). Also running tests using jsdom is much faster compared to Karma that needs a browser to run the tests. I would like to make a PR in order to replace Karma + Mocha + Chai + Sinon with Jest + Enzyme. Just wondering, is this is fine with the project objectives?

dvdzkwsk commented 7 years ago

Been away from this project for a while. I have not used Jest very much, but would be willing to give it a shot. I do prefer JSDOM over PhantomJS for the reasons mentioned, but do appreciate the safety offered by running tests in a legitimate browser.

If you'd like to submit a PR I can promise I'll seriously consider it. If not, I'll try to learn Jest in my spare time and evaluate a migration.

leimonio commented 7 years ago

I'd really like to submit a PR, I believe that there is a great potential in testing with Jest. Will come back to you with the PR related to this opened issue.