How to use the Reporter function from istanbul
Find comprehensive JavaScript istanbul.Reporter code examples handpicked from public code repositorys.
GitHub: bitovi/testee
264 265 266 267 268 269 270 271 272 273
var options = this.coverage; if (!options) { return; } var reporter = new istanbul.Reporter(false, options.dir); var collector = new istanbul.Collector(); var formats = options.reporters ? _.toArray(options.reporters) : ['text']; // If we are reporting text to the command line we need to add a newline
27
120
0
+ 2 other calls in file
36 37 38 39 40 41 42 43 44 45
} }); Object.defineProperty(exports, 'Reporter', { enumerable: true, get: function get() { return _istanbul.Reporter; } }); Object.defineProperty(exports, 'utils', { enumerable: true,
1
0
0
47 48 49 50 51 52 53 54 55 56
open("http://0.0.0.0:3000", "firefox"); } function generateCoverageReport(json) { var collector = new istanbul.Collector(), reporter = new istanbul.Reporter(), sync = false; collector.add(json); reporter.add('text'); reporter.addAll([ 'lcov', 'clover' ]);
0
3
4
GitHub: lxe/unitest
3 4 5 6 7 8 9 10 11 12
var rawJsonReporter = require('istanbul-reporter-raw-json'); istanbul.Report.register(rawJsonReporter); function report(objects, reports, reportDir) { var collector = new istanbul.Collector(); var reporter = new istanbul.Reporter(null, reportDir); objects.forEach(function(obj) { collector.add(obj); });
10
0
2
0 1 2 3 4 5 6 7 8 9
'use strict'; var istanbul = require('istanbul'); var collector = new istanbul.Collector(); var reporter = new istanbul.Reporter(); function report(objects, reports) { objects.forEach(function(obj) { collector.add(obj);
10
0
1
GitHub: pushrocks/tapbuffer
10 11 12 13 14 15 16 17 18 19
let localInstrumenter = new istanbul.Instrumenter({ coverageVariable: '__coverage__', instrumenter: istanbul.Instrumenter }) let localCollector = new istanbul.Collector() let localReporter = new istanbul.Reporter(null, `coverage/test-${testNumber}`) // handle testableFiles let testableFilesToInject = JSON.parse(process.env.TESTABLEFILES_JSON) let fileArray: smartinject.fileObject[] = []
0
0
2
GitHub: ZokugunJS/istanbul.cover
40 41 42 43 44 45 46 47 48 49
var excludes = config.instrumentation.excludes(true); var reportingDir = path.resolve(config.reporting.dir()); mkdirp.sync(reportingDir); //ensure we fail early if we cannot do this var reporter = new istanbul.Reporter(config); reporter.dir = reportingDir; var reports = config.reporting.reports(); var index;
0
0
2
+ 7 other calls in file
istanbul.Collector is the most popular function in istanbul (108 examples)