New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

karma-mocha-reporter

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karma-mocha-reporter - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

43

index.js

@@ -212,2 +212,26 @@ 'use strict';

/**
* Checks if all items are completed
*
* @param {object} items The item objects
* @returns {boolean}
*/
function allChildItemsAreCompleted (items) {
var item;
var isCompleted = true;
Object.keys(items).forEach(function(key){
item = items[key];
if (item.type === 'it') {
isCompleted = isCompleted && item.isCompleted;
} else if (item.items) {
// recursive check of child items
isCompleted = isCompleted && allChildItemsAreCompleted(item.items);
}
});
return isCompleted;
}
/**
* Writes the test results to the output

@@ -233,2 +257,7 @@ *

if (item.name && !item.printed && (!item.skipped || !ignoreSkipped)) {
// only print it block when it was ran through all browsers
if (item.type === 'it' && !item.isCompleted) {
return;
}
// indent

@@ -259,4 +288,8 @@ var line = repeatString(' ', depth) + item.name;

if (item.items) {
// print all child items
print(item.items, depth + 1);
var allChildItemsCompleted = allChildItemsAreCompleted(item.items);
if (allChildItemsCompleted) {
// print all child items
print(item.items, depth + 1);
}
}

@@ -440,4 +473,4 @@ }

item.failed = item.failed || [];
item.name = (result.success ? getLogSymbol(colors.success) : getLogSymbol(colors.error)) + ' ' + item.name;
item.success = result.success;
item.success = result.success && item.success;
item.name = (item.success ? getLogSymbol(colors.success) : getLogSymbol(colors.error)) + ' ' + item.name;
item.skipped = result.skipped;

@@ -470,2 +503,4 @@ item.visited = item.visited || [];

if (item.count === self.numberOfBrowsers) {
item.isCompleted = true;
// print results to output when test was ran through all browsers

@@ -472,0 +507,0 @@ if (outputMode !== 'minimal') {

6

package.json
{
"name": "karma-mocha-reporter",
"description": "Karma reporter with mocha style logging.",
"version": "2.0.0",
"version": "2.0.1",
"homepage": "http://www.litixsoft.de/modules-karmamochareporter",

@@ -54,3 +54,3 @@ "author": "Litixsoft GmbH <info@litixsoft.de> (http://www.litixsoft.de)",

"chai": "^3.5.0",
"grunt": "^0.4.5",
"grunt": "^1.0.0",
"grunt-contrib-copy": "^1.0.0",

@@ -76,3 +76,3 @@ "grunt-contrib-jshint": "^1.0.0",

"dependencies": {
"chalk": "1.1.1"
"chalk": "1.1.3"
},

@@ -79,0 +79,0 @@ "peerDependencies": {

@@ -210,2 +210,5 @@ # karma-mocha-reporter

## Release History
### v2.0.1
* Print correct failure summary and colors when a test fails only in one browser
### v2.0.0

@@ -212,0 +215,0 @@ * Move module karma to peerDependencies

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc