This is a discussion.
Which toolset you use in your react projects for unit test, code coverage and e2e test and why ?
Did you ever face a serious problem which made you think to switch other option/alternative?
If yes, what did you do ?
Have you ever went deep into the module and contributed for new issue which nobody else logged (like creating an issue and pull request for it) ?
Please share your experiences. Let's go dev.to learn and share.
Top comments (2)
1) Unit test (no-render components): mocha/titef
2) Unit tests (render components): jest + enzyme
3) Integration tests: jest + enzyme
4) E2E: wdio (with mocha)
I am the author of titef*, so 1) can be biased. In 2) I am taking in account snapshot testing. In 3) I am talking about integration between components.
Excluding titef, I'd use mocha for pretty much everything, but snapshots are extremely convenient, especially when you need to deliver fast. Bottom line, my decision tree goes pretty much like:
*: The reason why I started titef was that jest is incredibly slow, but I love snapshot testing. I didn't finish it yet, so right now it's just a faster mocha.
Interesting.