• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

How to check code coverage in NodeJS app?

 
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using NODE JS for my projects and there is a problem to maintain code coverage by writing test cases.

Can you please let me know how to measure code coverage in VS CODE or in any other IDE so it can be improve better.

Thanks
 
Marshal
Posts: 67463
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you using as a test runner? Code coverage isn't provided by an IDE, but rather the test runner.
 
author
Posts: 284
35
 
SunilK Chauhan
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am using mocha as test runner for my node js application.
 
Cay Horstmann
author
Posts: 284
35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is your question how to run Mocha from inside VS Code? Would this article help?

Cheers,

Cay
 
SunilK Chauhan
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My question is I am using mocha, but don't know how to check code coverage in node app inside vs code?

So this is my original question like how to check code coverage of node js app in vs code?
 
Bear Bibeault
Marshal
Posts: 67463
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Was the article Cay pointed to not clear in that respect?
 
It wasn't my idea to go to some crazy nightclub in the middle of nowhere. I just wanted to stay home and cuddle with this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic