|
|
@ -3,7 +3,6 @@ const pify = require('pify'); |
|
|
|
const fs = require('fs'); |
|
|
|
const fs = require('fs'); |
|
|
|
const path = require('path'); |
|
|
|
const path = require('path'); |
|
|
|
const istanbul = require('istanbul'); |
|
|
|
const istanbul = require('istanbul'); |
|
|
|
const util = require('util'); |
|
|
|
|
|
|
|
const assert = require('assert'); |
|
|
|
const assert = require('assert'); |
|
|
|
const detect = require('detect-port'); |
|
|
|
const detect = require('detect-port'); |
|
|
|
const _ = require('lodash/lang'); |
|
|
|
const _ = require('lodash/lang'); |
|
|
@ -13,6 +12,8 @@ const Instrumenter = require('./instrumenter'); |
|
|
|
const Coverage = require('./coverage'); |
|
|
|
const Coverage = require('./coverage'); |
|
|
|
const DataCollector = require('./collector'); |
|
|
|
const DataCollector = require('./collector'); |
|
|
|
const AppUI = require('./ui').AppUI; |
|
|
|
const AppUI = require('./ui').AppUI; |
|
|
|
|
|
|
|
const utils = require('./../plugins/resources/plugin.utils'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Coverage Runner |
|
|
|
* Coverage Runner |
|
|
@ -60,6 +61,7 @@ class API { |
|
|
|
|
|
|
|
|
|
|
|
this.setLoggingLevel(config.silent); |
|
|
|
this.setLoggingLevel(config.silent); |
|
|
|
this.ui = new AppUI(this.log); |
|
|
|
this.ui = new AppUI(this.log); |
|
|
|
|
|
|
|
this.utils = utils; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -175,9 +177,11 @@ class API { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Generate coverage / write coverage report / run istanbul |
|
|
|
* Generate coverage / write coverage report / run istanbul |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
async report() { |
|
|
|
async report(_folder) { |
|
|
|
|
|
|
|
const folder = _folder || this.istanbulFolder; |
|
|
|
|
|
|
|
|
|
|
|
const collector = new istanbul.Collector(); |
|
|
|
const collector = new istanbul.Collector(); |
|
|
|
const reporter = new istanbul.Reporter(false, this.istanbulFolder); |
|
|
|
const reporter = new istanbul.Reporter(false, folder); |
|
|
|
|
|
|
|
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
try { |
|
|
|
try { |
|
|
|