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
Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png