DEV Community

Thidasa Pankaja Paranavitharana
Thidasa Pankaja Paranavitharana

Posted on

What is the best testing framework for React application ?

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 ?

Top comments (2)

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

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