Socket
Socket
Sign inDemoInstall

karma-coverage-istanbul-reporter

Package Overview
Dependencies
16
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0 to 3.0.1

11

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

### [3.0.1](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/compare/v3.0.0...v3.0.1) (2020-05-04)
### Bug Fixes
* set correct process exit code when thresholds are not met ([9ba3fe0](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/commit/9ba3fe0acf3ee778518c154a8dd050584f47bc13)), closes [#80](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/issues/80)
## [3.0.0](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/compare/v2.1.1...v3.0.0) (2020-05-01)

@@ -13,2 +20,4 @@

* If using threshold reporting and the programmatic karma api, then the exitCode will no longer be returned as 1 when thresholds are not met.
### Features

@@ -222,2 +231,2 @@

* Initial release
* Initial release
{
"name": "karma-coverage-istanbul-reporter",
"version": "3.0.0",
"version": "3.0.1",
"description": "A karma reporter that uses the latest istanbul 1.x APIs (with full sourcemap support) to report coverage.",

@@ -69,2 +69,3 @@ "funding": {

"rimraf": "^3.0.2",
"sinon": "^9.0.2",
"standard-version": "^7.1.0",

@@ -117,3 +118,6 @@ "ts-loader": "^7.0.2",

}
},
"mocha": {
"timeout": 10000
}
}

16

src/reporter.js

@@ -77,3 +77,3 @@ const path = require('path');

async function createReport(browserOrBrowsers, results) {
async function createReport(browserOrBrowsers) {
const reportConfigOverride =

@@ -200,4 +200,6 @@ !coverageConfig.combineBrowserReports && coverageConfig.dir

if (thresholdCheckFailed && results && !thresholds.emitWarning) {
results.exitCode = 1;
if (thresholdCheckFailed && !thresholds.emitWarning && config.singleRun) {
process.on('exit', () => {
process.exit(1);
});
}

@@ -231,11 +233,9 @@ }

const baseReporterOnRunComplete = this.onRunComplete;
this.onRunComplete = async function (browsers, results) {
this.onRunComplete = async function (browsers) {
Reflect.apply(baseReporterOnRunComplete, this, arguments);
if (coverageConfig.combineBrowserReports) {
await createReport(browsers, results);
await createReport(browsers);
} else {
await Promise.all(
browsers.map((browser) => createReport(browser, results))
);
await Promise.all(browsers.map((browser) => createReport(browser)));
}

@@ -242,0 +242,0 @@ };

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc