CleanCodeCompany / adopt-ireland-site

0 stars 0 forks source link

Setup testing framework #2

Open CFitzsimons opened 6 years ago

CFitzsimons commented 6 years ago

We can either use Mocha with Enzyme or try to setup Jest which is known to work better with React.

JackTilley92 commented 6 years ago

"Given the recent investments that Facebook has been making and the general positive response from the React community, I would recommend giving Jest a shot, unless:

You have identified parts of your tool chain that don’t support Jest (e.g., WebStorm debugger example from above)

You have a large interest in future flexibility–being able to swap out assertion, mocking, other test libraries, etc.

You place a lot of value in having a large archive of support (e.g., blog posts, videos, libraries, etc.). It seems like Mocha has been used for everything under the sun, and I’m always able to find a blog post explaining how to use Mocha with Library X or some new JavaScript feature, such as async/await."

https://spin.atomicobject.com/2017/05/02/react-testing-jest-vs-mocha/