Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests and browser tests. Built for scale.
Hello,
I have web app on tomcat written in JS. I am testing it with casperjs.
Is it possible to get coverage of it with istanbul.
I tried to run Istanbul on nodejs, and hookup sources of my project.
then send POST requests to it from casperJS:
{ casper.evaluate(function () {
var xmlhttp = new XMLHttpRequest();
xmlhttp.open('POST', '/coverage/client', true);
xmlhttp.setRequestHeader('Content-Type', 'application/json');
xmlhttp.send(JSON.stringify(window.coverage));
});}
but window.__coverage__ is undefined.
Can someone give advice how to get coverage in my situation.
Hello, I have web app on tomcat written in JS. I am testing it with casperjs. Is it possible to get coverage of it with istanbul. I tried to run Istanbul on nodejs, and hookup sources of my project. then send POST requests to it from casperJS: { casper.evaluate(function () { var xmlhttp = new XMLHttpRequest(); xmlhttp.open('POST', '/coverage/client', true); xmlhttp.setRequestHeader('Content-Type', 'application/json'); xmlhttp.send(JSON.stringify(window.coverage)); });} but
window.__coverage__
is undefined.Can someone give advice how to get coverage in my situation.