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/

50 questions
2
votes
0 answers

code coverage using blanketjs for Javascript AMD project

I am trying to use blanket for my project which is built using requirejs - AMD pattern. For example, My Module A is requiring Module B, so as you know I don't include because requirejs gets that module by itself.…
Sreekanth
  • 503
  • 1
  • 5
  • 10
2
votes
0 answers

Code coverage with Dojo, Mocha and Blanket - always reporting 1 covered line

I have tried setting up Blanket.js to get reports on the code coverage of our Dojo app, which we are testing using Mocha. So far, Blanket seems to load, instrument the correct files, and it also seems to figure out which lines it should look for.…
Victor Sand
  • 2,270
  • 1
  • 14
  • 32
2
votes
0 answers

Blanket.js Report not showing a report with Mocha.js

I am having trouble getting the Blanket.js report to show in the browser when testing with mocha.js. My HTML file is: Cow tests
Mat Forsberg
  • 454
  • 2
  • 10
2
votes
1 answer

How do I create multiple bundles with gulp-browserify?

I'm trying to use blanket.js to measure test coverage of my browserified library, and the coverage numbers aren't making much sense since I'm including jQuery, lodash, es5-shim, and x-tag-core.js in the bundle. I would like to create multiple…
thebjorn
  • 26,297
  • 11
  • 96
  • 138
1
vote
0 answers

Can't attach successfully to the start event of mocha runner

I'm trying to setup blanket to run with my in-browser mocha tests. To do this, I'm following the pattern in the mocha-blanket.js file here, but trying to integrate into my existing runner. I want to add some code to run when the start event is…
Kolichikov
  • 2,944
  • 31
  • 46
1
vote
1 answer

Test Case to call function on Document.ready

My JS code is mentioned below: if (typeof IPL === "undefined") { IPL = {}; } /// Declare Namespace IPL.Register if (typeof IPL.Register === "undefined") { IPL.Register = {}; } $(document).ready(function () { …
Raj
  • 183
  • 3
  • 17
1
vote
1 answer

Javascript test case for Keypress event

The code of my JS file is mentioned below: $('#HeaderLink').keypress(function (e) { var key = e.which; if (key == 13) { TravelRegistration.expandSection(); } }); When I run following Javascript Test Case…
Raj
  • 183
  • 3
  • 17
1
vote
0 answers

How to find out Code Coverage by using Blanket.js

How to find out Code Coverage by using Blanket.js. In our MVC project I have added Javascript files in this hierarchy: But in…
user4956321
  • 313
  • 1
  • 3
  • 15
1
vote
1 answer

BlanketJS + Jasmine + RequireJS no code coverage

I am trying to get the same setup as this tutorial. First Off. My file structure is: /assests /css /font /img /js /collection /lib /model /plugin /spec -> Tests in here /view SpecRunner.js …
Filipe Teixeira
  • 3,565
  • 1
  • 25
  • 45
1
vote
1 answer

Mocha with Blanket, Babel and LCOV reporter

Hiho, I've got a problem with my Mocha configuration. I've got ES6 code which should be compiled by Babel and then I want to get coverage (in LCOV format) of this ES6 code. My approach to this problem was to use mocha, mocha-lcov-reporter, babel and…
Dawid Rusnak
  • 527
  • 3
  • 13
1
vote
0 answers

ember-cli-blanket not working

I have installed the plugin for 'ember-cli-blanket', using command: ember install:addon ember-cli-blanket0 But when I run the tests using "http://localhost:4200/tests", nothing is loading I am getting just a blank page, no error in console…
Vineeth Koppai
  • 141
  • 1
  • 6
1
vote
1 answer

Running mocha with blanket coverage causes the tests not to run

In my package.json, I have: "scripts": { "test": "mocha --require blanket -R html-cov > test/coverage.html --compilers coffee:'./node_modules/coffee-script/lib/coffee-script/register'" }, So if I run npm test, I get: npm test >…
Shamoon
  • 41,293
  • 91
  • 306
  • 570
1
vote
0 answers

Blanket.js not showing correct statement coverage with QUnit

I am trying out Blanket.js and QUnit, and have written some tests for a particular function that populates a form and submits it. Here is the function I'm testing: myObj.populateAndSubmitForm = function (data) { var $authToken =…
lilactown
  • 1,008
  • 11
  • 9
1
vote
0 answers

Don't see any Blanket coverage report on my Jasmine unit tests loaded using RequireJS even after configuring it without errors

Before my question I'll give some context on the libraries I'm using Unit Test Framework : Jasmine 1.3.1 AMD Loader : RequireJS Code Coverage Tool : Blanket My unit tests are all setup. I've been trying to get some test coverage of a small module…
Bhargav Shah
  • 737
  • 1
  • 7
  • 15
1
vote
1 answer

Blanket.js coverage of dynamically loaded script file

I am using Blanket.js to test code coverage (with Jasmine, though I don't think this matters). I have some scripts which are only loaded as needed. These are loaded using jQuery's $.getScript() function. How can I get Blanket.js to report…
garlon4
  • 1,162
  • 10
  • 14