Report Class
abstract report class for producing coverage reports.
Usage
var Report = require('istanbul').Report,
report = Report.create('html'),
collector = new require('istanbul').Collector;
collector.add(coverageObject);
report.writeReport(collector);
Constructor
Report
(
protected
-
options
Parameters:
-
optionsObjectOptional. The options supported by a specific store implementation.
Item Index
Methods
- create static
- register static
- writeReport
Methods
create
(
Report
static
-
type -
opts
returns a report implementation of the specified type.
Parameters:
-
typeStringthe type of report to create
-
optsObjectOptional. Options specific to the report implementation
Returns:
Report:
a new store of the specified type
register
(
static
-
constructor
registers a new report implementation.
Parameters:
-
constructorFunctionthe constructor function for the report. This function must have a
TYPEproperty of type String, that will be used inReport.create()
writeReport
(
-
collector -
sync
writes the report for a set of coverage objects added to a collector.
Parameters:
-
collectorCollectorthe collector for getting the set of files and coverage
-
syncBooleantrue if reports must be written synchronously, false if they can be written using asynchronous means (e.g. stream.write)
