clocal-gcp icon indicating copy to clipboard operation
clocal-gcp copied to clipboard

Add code coverage with nyc tool with HTML support

Open anuragparida opened this issue 6 years ago • 0 comments

Used nyc tool by IstanbulJS to provide Code coverage with added functionality of HTML support (see below)-

  • Employed method to generate HTML file in ./coverage depicting Code Coverage results in both CLI format and Graphical format.

  • Run the coverage command with sudo npm test to view the coverage details in the CLI and generate an HTML file in ./coverage.

CodeCoverageCommand

  • View the Graphical data by opening ./coverage/index.html in a web browser.

CodeCoverageBrowser

  • You can then browse the directory structure to see which files failed the tests.

CodeCoverageDirectoryStructure

anuragparida avatar Nov 27 '18 07:11 anuragparida