add coverage option

This commit is contained in:
2017-06-16 16:08:36 +02:00
parent 2bd187b704
commit 455c89d68d
5 changed files with 33 additions and 18 deletions

View File

@ -114,12 +114,19 @@ export let run = function (configArg: INpmtsConfig) {
plugins.beautylog.ora.text('now starting tests')
plugins.beautylog.ora.end()
plugins.beautylog.log('ready for tapbuffer:')
if (configArg.coverage) {
tap(config)
.then(handleCoverageData)
.then(() => {
done.resolve(config)
}).catch(err => { console.log(err) })
} else {
tap(config)
.then(() => {
done.resolve(config)
}).catch(err => { console.log(err) })
}
tap(config)
.then(handleCoverageData)
.then(() => {
done.resolve(config)
}).catch(err => { console.log(err) })
} else {
plugins.beautylog.ora.end()
done.resolve(config)