Questions tagged [blanket.js]

Blanket.js is an open source code coverage tool for javascript.

Blanket.js is an easy to install, easy to configure, and easy to use JavaScript code coverage library that works both in-browser and with nodejs.

The project currently supports Qunit, Mocha and Jasmine test runners.

The project website can be found here: http://blanketjs.org/

49 questions
37
votes
1 answer

Blanket.js vs Istanbul-js vs JSCover

I am trying to decide on a JS test code coverage tool but cannot see clearly the differences between them. The top hits in Google are blanket.js, istanbul-js and JSCover. Can anyone offer any information on the key differences between them and…
Christopher Grigg
  • 1,895
  • 20
  • 28
25
votes
3 answers

Running Blanket.js

I am testing some code programmatically using Jasmine from Node. To do this, I've setup the following: function runTests() { var Jasmine = require('jasmine'); var jasmine = new Jasmine(); jasmine.loadConfig({ spec_dir:…
xam developer
  • 1,713
  • 5
  • 23
  • 38
14
votes
3 answers

Ember CLI and code coverage

Has anyone managed to get code coverage working with an Ember CLI project? I've tried using blanket.js and istanbul, as have others here, here and here, neither with any success. I've managed to get each to actually produce a coverage report but the…
Wungsow
  • 141
  • 1
  • 4
10
votes
2 answers

BlanketJS + Jasmine 2.0 not working

I have been testing with Jasmine 2.0.0 and it works without any problem. But there's a problem when I append BlanketJS to my code. I used a specRunner(https://github.com/alex-seville/blanket/blob/master/test/jasmine-requirejs/runner.html) that…
SJ Baek
  • 128
  • 1
  • 6
7
votes
4 answers

I am getting 0 % coverage 0 SLOC in mocha code coverage using blanket

I am trying to get the code coverage in MOCHA JS test. I am using the blanket and the but I am getting 0 % coverage 0 SLOC why I am not understanding. my package.json is { "name": "basics", "version": "1.0.0", "description": "", "main":…
user993158
  • 79
  • 5
6
votes
1 answer

Combining code coverage reports in javascript for coveralls

I have node.js based projects that also include client side code. I have 2 separate unit test suites, 1 for front end and 1 for back end. I currently have mocha running using blanket for code coverage and piping the result into the coveralls module…
5
votes
1 answer

how to ensure 100% code coverage of git commits with grunt-mocha-cov

I am trying to set up a continuos integration environment (using quick build) wherein on every commit to a git branch I want to run our test suite, check code coverage and revert commits if either the test fails or the code coverage is below a…
4
votes
1 answer

Blanket.js not working with qunit

I'm unable to get blanket.js test coverage to work with qunit, literally nothing happens despite many attempts at re-configuring and trying to invoke debugging. These are the documented instructions I tried to follow -…
Jonathan Miles
  • 8,186
  • 10
  • 39
  • 63
3
votes
1 answer

Ember-cli: importing blanket.js causes test runners to hang

I'm currently using ember-cli with ember-qUnit for testing. I would also like to add code coverage results to the test output, so after some research blanketjs seemed the way to go. I installed blanket using: npm install blanket And moved the…
char_alpha
  • 46
  • 4
3
votes
1 answer

Grunt-Mocha-Test BlanketJS Coverage

I'm trying to setup code coverage with with grunt-mocha-test plugin for GruntJS. I have followed this guide, under the section 'Generating Coverage'. However, running grunt produces a coverage.html report that only has coverage for the test files…
iQ.
  • 3,263
  • 5
  • 33
  • 54
3
votes
1 answer

How to do test coverage with blanket and mocha in sailsjs

I have a Sails project with a test/ folder containing all my mocha tests and want to create a test coverage report using following command: mocha --require blanket --reporter html-cov > coverage.html The blanket configuration inside my package.json…
david.schreiber
  • 3,741
  • 2
  • 25
  • 45
2
votes
2 answers

Any JavaScript code coverage tools for client-server apps in Google Closure?

I'm trying to get code coverage for unit tests in a Google Closure client-server project. We have code coverage for the server side, and need client side coverage. JSCover runs its own server. Our cleint side unit tests require running under our…
Mike
  • 3,024
  • 1
  • 23
  • 43
2
votes
1 answer

Chutzpah coverage result smaller than 100% (due to private methods?)

I use Chutzpah to test my JavaScript test coverage. Here is an example for the coverage result when I run a single test file referenceFigureEdit.spec.js: I would expect the coverage to be 100% but it is only 91.07%. Clicking on the first line I can…
Stefan
  • 6,227
  • 1
  • 34
  • 75
2
votes
0 answers

How to use Blanket.js in test files loaded with Require.js?

I am testing a JavaScript API using QUnit and BlanketJS and I separated it in multiple files for a better organization. I use RequireJS to load the files of the API. The problem is, now I can't put the BlanketJS data-cover attribute on the JS files…
joaorodr84
  • 1,114
  • 2
  • 12
  • 30
2
votes
1 answer

Consume blanket.js coverage reports in Jenkins

I have a node.js project running mocha tests, and I'm generating a coverage report using blanket. I've managed to get the coverage report generated, but I'm not sure how to generate a report that can be consumed by and viewed in Jenkins. Any…
Michael A
  • 89
  • 1
  • 9
1
2 3 4