Questions tagged [istanbul]

A JavaScript code coverage tool written in JavaScript.

The Istanbul 2.0 API is now available and is being actively developed in the new istanbuljs organization.

Istanbul - a JavaScript code coverage tool written in JavaScript

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 JavaScript 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.js (prev, current and next versions) and the browser (instrumentation library only)
624 questions
0
votes
1 answer

Grunt-template-jasmine-istanbul missing dir error

I install grunt plugins grunt-template-jasmine-istanbul npm install grunt-template-jasmine-istanbul --save-dev and add to Gruntfile.js as following: coverage: { src: ['app/scripts/**/*.js'], options: { specs: ['test/**/*.js'], …
o0omycomputero0o
  • 3,316
  • 4
  • 31
  • 45
0
votes
2 answers

Instanbul Keeps Dumping Coverage Report HTML files in wrong directory

Here's my config file: module.exports = function(config) { config.set({ basePath: './', autoWatch: true, frameworks: ['jasmine'], files: [ '../public_html/libs/mylib/lib.js', …
Levi Hackwith
  • 9,232
  • 18
  • 64
  • 115
0
votes
1 answer

Generate HTML code coverage reports with intern

The intern testing framework (http://theintern.io) comes with built in istanbul support. Adding lcov to the reports array generates only a lcov.info file which might be converted with genhtml: define({ // .. reporters: [ 'lcov' ], …
jantimon
  • 36,840
  • 23
  • 122
  • 185
-1
votes
1 answer

Cannot read property 'nativeElement' of null with ngif

I am doing some unit tests. So I have this function: selectCluster(event: MouseEvent, feature: any) { event.stopPropagation(); this.selectedCluster = {geometry: feature.geometry, properties: feature.properties}; } and tempplate: …
-1
votes
1 answer

How to write unit tests for angularjs project using cypress

I am new to cypress and I want to write unit tests for my existing application. Can anyone suggest how to write unit tests for angular js using cypress and code coverage? I have followed the documentation but I am not getting combined results. The…
-1
votes
1 answer

How to unit test OidcSecurityService.Auth() with jasmine?

I am using Jasmine for unit testing. And I am using OidcSecurityService. So I made a mock for it, like this: export class OidcSecurityServiceStub{ getToken(){ return 'some_token_eVbnasdQ324'; } } and I have this component: export class…
-1
votes
1 answer

Angular - How do I unit test a function inside an rxjs 6 operator using jasmine so that it shows up as covered in istanbul?

How do I get the code inside the skipWhile to show as covered by istanbul? I'm using Angular, jasmine and rxjs 6. It can be a completely trivial test as long as the coverage stat shows its covered. ngOnInit() { this.claimSubscription =…
user935618
  • 65
  • 1
  • 7
-1
votes
1 answer

How to increase the code coverage using istanbul in node.js

I am using Istanbul for code coverage, but i m getting very low coverage percentage particularly in Models file. Consider the following is the model file: ModelA.js const mongoose = require('mongoose'); const Schema = mongoose.Schema; var app =…
Subburaj
  • 5,114
  • 10
  • 44
  • 87
-1
votes
1 answer

Istanbul + codecoverage + mocha

I am using istanbul for my code coverage. The summary is printed successfully but i am getting error after that. Command: istanbul cover --print detail node_modules/mocha/bin/_mocha --…
Subburaj
  • 5,114
  • 10
  • 44
  • 87
1 2 3
41
42