DEV Community

Discussion on: Start Testing Your JavaScript Code with Jest

Collapse
 
ligarp profile image
Ragil B. Pamungkas

thank you for the article. why did u use jest instead of mocha and chai?
I can't wait to see how to use jest on jsx or tsx hehe

Collapse
 
ohdylan profile image
Dylan Oh

Hey Ragil, thanks for leaving a comment! I generally prefer Jest because it provides a lot of built-in functionalities such as test runner, code coverage etc, without having to combine with other testing tools (it's like all in one) :)

However, Mocha makes a good combination with other libraries such as Sinon.js, Chai.

In order to test React, I planned to use methods from RTL and combination with Jest :)

Some comments have been hidden by the post's author - find out more