Junior From PDF Node.js Node.js

What is test coverage and how do you measure it?

Test coverage shows how much of your code is tested (lines, branches, functions).

Tools to measure:

  • Istanbul/nyc: Most popular coverage tool.
  • Jest: Has built-in coverage reports.

Run coverage with nyc:

nyc mocha

It outputs stats like:

  • % of lines covered
  • % of functions covered
  • % of branches covered

Security in Node.js

Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details