Reputation: 393
Could anyone, please, recommend simple test coverage tool for Node.js without using Mocha because I use simple functions from assert
module of Node in my own test framework.
Upvotes: 1
Views: 3686
Reputation: 11557
The standard library for code coverage is nyc, so that's my suggestion; however, you aren't going to get code coverage to work with a test framework you came up with yourself for free -- you'll need to make sure you are instrumenting the appropriate source files so the report contains what you expect.
The following links, which discuss non-standard uses of nyc (non-standard meaning, not jasmine or mocha) might be useful - one for classic istanbul, one for the newer nyc: https://github.com/gotwarlost/istanbul/issues/574 https://github.com/istanbuljs/nyc/issues/548
Upvotes: 3
Reputation: 49
You can use Jest and Supertest.
Upvotes: 1