hwclass / ziya

:pencil2: Your local in-browser editor
MIT License
62 stars 2 forks source link

decide react unit testing tool #13

Open hwclass opened 7 years ago

altaywtf commented 7 years ago

I think Jest is suitable for this project in general. Both on the server and client side assertions.

However, if we are going to examine all kind of behaviours of a React component (like changes in the state and listening the method calls) I think we can also add enzyme for its useful api.

I've recently updated testing setup of my React-Redux applications from karma-mocha-chai-enzyme to just jest - enzyme. Only downside is Jest uses something like JSDOM so my tests are not running in the browser.

hwclass commented 7 years ago

After a little of my experiences actually, it would be nice to choose enzyme with jest. I have seen the utility tool, you're right. I think it is a kind of a cheerio. Cool.