DEV Community

loading...

What is the best testing framework for React application ?

thidasapankaja profile image Thidasa Pankaja Paranavitharana ・1 min read

I'm working on my first side project and this is the first time I'm going to work on testing as well . I'm comfortable with React but not with it's testing.

So, can anyone explain to me what's the most easiest and suitable way test a React application.

Just want to know the differences between Mocha , Chai , Jest , Jasmine , Enzyme . Can anyone please explain this to me ?

As a newbie to testing, what should I start with ?

Discussion

pic
Editor guide
Collapse
mangel0111 profile image
miguel-penaloza

For my experience, Jest and Enzyme are the best, with Jest you can create snaptshot and make sure of the consistence of your code, also is a very good tool to create unit test and TDD. And enzyme is the best if you wanna make BDD test, you can shallow and mount your components, change the state, update with props, you can access to the DOM and click things.

Collapse
thidasapankaja profile image
Thidasa Pankaja Paranavitharana Author

Thanks. Don't know much about testing types even. Have to look at them too.