What is Istanbul?
Who uses Istanbul?
Istanbul Integrations
Here are some stack decisions, common use cases and reviews by companies and developers who chose Istanbul in their tech stack.
Needs advice on code coverage tool in Node.js/ExpressJS with External API Testing Framework
Hello community,
I have a web application with the backend developed using Node.js and Express.js. The backend server is in one directory, and I have a separate API testing framework, made using SuperTest, Mocha, and Chai, in another directory. The testing framework pings the API, retrieves responses, and performs validations.
I'm currently looking for a code coverage tool that can accurately measure the code coverage of my backend code when triggered by the API testing framework. I've tried using Istanbul and NYC with instrumented code, but the results are not as expected.
Could you please recommend a reliable code coverage tool or suggest an approach to effectively measure the code coverage of my Node.js/Express.js backend code in this setup?
Blog Posts
Istanbul's Features
- All-javascript instrumentation library that tracks statement, branch, and function coverage
- Module loader hooks to instrument code on the fly
- Command line tools to run node unit tests "with coverage turned on" and no cooperation whatsoever from the test runner
- Multiple report formats: HTML, LCOV, Cobertura and more
- Ability to use as middleware when serving JS files that need to be tested on the browser
- Can be used on the command line as well as a library
- Based on the awesome esprima parser and the equally awesome escodegen code generator
- Well-tested on node (prev, current and next versions) and the browser (instrumentation library only)