Nowadays, the industry is dominated by agile development and tight deadlines. Manual unit testing can be complex and time-consuming, so it makes sense to rely on automated frameworks.
Some of the favorites include: Jest, Mocha, Jasmine, Karma.
Do you unit test your code and what's your favorite testing framework?
Latest comments (23)
Thanks for the valuable insight π―πβ¨
Jest, Enzyme, React Testing Library and Cypress.
Thanks for the input πβ€
We use React on our frontend, so Jest and Enzyme are our preferred JS testing frameworks. Since these are quite popular, there are also a lot of great resources out there on using them, and Jest is even recommended in React's docs.
I use tape for most purposes. Simple, lightweight, works as well today as it did years and years ago. It's also very similar to Rust's built-in test runner, so when I move between languages the context switch is that much lighter.
I also personally dislike the bdd test style (thus I wouldn't use a framework that only provides that option, assuming the choice is mine). Not for any technical reasons that actually matter, just personal taste. So much noise for the same results.
Thanks for the input ππ
For unit tests my favorite combo is Mocha/Chai, plus Sinon if I need mocks (though it's rarely the case for unit testing). For dev E2E I'm a big fan of CodeceptJS, far superior to Cypress IMHO.
Thanks for the insight πβ€
I use Jest and Ava, Ava was the only framework that allow async tests loading, so it was the only option for my Scheme interpreter.
Thanks for the input πβ€
Cypress. But only for frontend testing (integration testing is awesome), jest for backend, nodejs testing.
Oh, yeah, heard about that too ππ
ava is the one I like the most. Very similar to tape but adds some convenient features.
Thanks for the input πβ€
Jest for now, though I'm building my own!
I try to build my own
<everything>
. I'm building my own framework, my own ghost, my own programming language, etc.Awesome to hear, best of luck in you projects ππ
The QA dept. πππ
Haha, made my day ππ