When you run jest --coverage, what does the Branches column do/mean?
Conditional statements create branches of code which may not be executed (e.g. if/else). This metric tells you how many of your branches have been executed.
jingteng
Updated on June 07, 2022Comments
-
jingteng almost 2 years
I ran my tests and this is what I received:
---------------|----------|----------|----------|----------|-------------------| File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s | ---------------|----------|----------|----------|----------|-------------------| All files | 100 | 0 | 100 | 100 | | Search | 100 | 100 | 100 | 100 | | index.js | 100 | 100 | 100 | 100 | | SearchResults | 100 | 0 | 100 | 100 | | index.js | 100 | 0 | 100 | 100 | 4 | ---------------|----------|----------|----------|----------|-------------------| Test Suites: 2 passed, 2 total Tests: 5 passed, 5 total Snapshots: 1 passed, 1 total Time: 4.678s
I've changed something and now I have 0% on Branch column but I don't know what it means in order to improve it.