DEV Community

loading...

What's your setup for JavaScript Testing and Code Coverage

Randel Ramirez
Basketball | Programming | Surfing
・1 min read

I'm curious to know what are the tools/frameworks you guys use in your development environment for testing and code coverage for your JavaScript applications(React, Angular, Vue, or just vanilla/native JavaScript)?

I know there a are a lot of tools available, but I would really like to know what my fellow developers/software engineers are using.

Thanks! :)

Discussion (6)

Collapse
herrfugbaum profile image
Pascal

I use Jest for my tests, it has Istanbul baked right in.
You can use it with

jest --coverage

or via Jest configuration.

For E2E tests puppeteer sounds like a good fit. There is also a jest plugin for puppeteer.

Collapse
joelnet profile image
JavaScript Joel

Ditto

Collapse
minche profile image
Minja Davidović

For React apps, Jest with Enzyme and Storybook (as a combination of docs and snapshot tests).
I found Storybook with its storyshots very useful while working on a project that required 100% code coverage and docs.

Collapse
cybershivanka profile image
cybershivanka

Hi Minja,

I'm interested in the same combination to be incorporate for my front-end project. It would be great, If you could give me some resources/ links/ etc. to guide me through a correct pathway ?
Actually i was referring to the Storybook, but never come across the actual usage of it.

Collapse
ozzyogkush profile image
Derek Rosenzweig

I like Sinon/Chai but also use Jest/Enzyme for testing. For code coverage I like Istanbul (aka NYC).

Collapse
randelramirez profile image
Randel Ramirez Author

That's nice to hear! thanks for the feedback!