How to use the istanbul.Reporter function in istanbul

To help you get started, we’ve selected a few istanbul examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sugarcrm / sucrose / test / lib / coverage.js View on Github external
this.reportAll = function() {
    let reporter = new istanbul.Reporter();
    reporter.addAll(["text"]);
    console.log("Cummulative Coverage Report:");
    reporter.write(accumulator, sync, function() {
      // console.log("Cummulative report generated.");
    });
  };
};
github rvikmanis / redux-fp / test / istanbul.reporter.js View on Github external
module.exports = function (runner) {
  const collector = new instanbul.Collector();
  const reporter = new instanbul.Reporter();
  new MochaSpecReporter(runner);

  runner.on('end', function () {
    collector.add(global.__coverage__);
    reporter.addAll(['json', 'lcovonly']);
    reporter.write(collector, true, function () {
      process.stdout.write('report generated');
    });
  });
};
github cinecove / defunctr / test / istanbul.reporter.js View on Github external
module.exports = function (runner) {
  const collector = new instanbul.Collector();
  const reporter = new instanbul.Reporter();
  reporter.addAll(['lcov', 'json']);
  new MochaSpecReporter(runner);

  runner.on('end', function () {
    collector.add(global.__coverage__);

    reporter.write(collector, true, function () {
      process.stdout.write('report generated');
    });
  });
};
github substance / substance / gulpfile.js View on Github external
gulp.task('coverage', function(done) {
  var collector = new istanbul.Collector();
  var reporter = new istanbul.Reporter(null, './coverage/report');
  reporter.addAll(['lcov']);
  glob("./coverage/json/**/coverage*.json", {}, function (err, files) {
    files.forEach(function (file) {
      var coverageObject = JSON.parse(fs.readFileSync(file, 'utf8'));
      collector.add(coverageObject);
    });
    files.forEach(function(f) {
      console.log('Adding coverage file '+f);
      collector.add(JSON.parse(fs.readFileSync(f, 'utf8')));
    });
    reporter.write(collector, false, done);
  });
});
github tomkallen / datafield / istanbul.reporter.js View on Github external
module.exports = function (runner) {
  const collector = new instanbul.Collector()
  const reporter = new instanbul.Reporter()
  reporter.addAll(['lcov', 'json'])
  new MochaSpecReporter(runner)

  runner.on('end', function () {
    collector.add(global.__coverage__)

    reporter.write(collector, true, function () {
      console.log('report generated')
    })
  })
}

istanbul

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

BSD-3-Clause
Latest version published 8 years ago

Package Health Score

52 / 100
Full package analysis