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 1.1.1 to 1.1.2

50

index.js

@@ -21,2 +21,20 @@ 'use strict';

/**
* Returns the text repeated n times.
*
* @param {!string} text The text.
* @param {!number} n The number of times the string should be repeated.
* @returns {string}
*/
function repeatString (text, n) {
var res = [];
var i;
for (i = 0; i < n; i++) {
res.push(text);
}
return res.join('');
}
config.mochaReporter = config.mochaReporter || {};

@@ -26,2 +44,6 @@

var ignoreSkipped = config.mochaReporter.ignoreSkipped || false;
var divider = config.mochaReporter.divider;
if (divider !== '') {
divider = repeatString('=', process.stdout.columns || 80);
}

@@ -76,20 +98,2 @@ // disable chalk when colors is set to false

/**
* Returns the text repeated n times.
*
* @param {!string} text The text.
* @param {!number} n The number of times the string should be repeated.
* @returns {string}
*/
function repeatString (text, n) {
var res = [];
var i;
for (i = 0; i < n; i++) {
res.push(text);
}
return res.join('');
}
/**
* Writes the test results to the output

@@ -105,7 +109,2 @@ *

if (firstRun) {
self.write('\n' + chalk.underline.bold('Start:') + '\n');
firstRun = false;
}
for (i = 0; i < length; i++) {

@@ -327,2 +326,7 @@ item = suite[keys[i]];

self.onRunStart = function (browsers) {
if (!firstRun && divider) {
self.write('\n' + chalk.bold(divider) + '\n');
}
firstRun = false;
self.write('\n' + chalk.underline.bold('START:') + '\n');
self._browsers = [];

@@ -329,0 +333,0 @@ self.allResults = {};

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

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

"grunt": "^0.4.5",
"grunt-contrib-copy": "^0.8.0",
"grunt-contrib-jshint": "^0.11.2",
"grunt-karma": "^0.12.0",
"grunt-contrib-copy": "^0.8.2",
"grunt-contrib-jshint": "^0.11.3",
"grunt-karma": "^0.12.1",
"grunt-shell": "^1.1.2",
"jasmine-core": "2.3.4",
"karma-chrome-launcher": "*",
"karma-detect-browsers": "^2.0.1",
"karma-detect-browsers": "^2.0.2",
"karma-firefox-launcher": "*",

@@ -64,8 +64,8 @@ "karma-ie-launcher": "*",

"karma-safari-launcher": "*",
"phantomjs": "1.9.17"
"phantomjs": "1.9.18"
},
"dependencies": {
"chalk": "1.1.0",
"chalk": "1.1.1",
"karma": ">=0.9"
}
}

@@ -122,2 +122,31 @@ # karma-mocha-reporter

### divider
**Type:** String
**Default:** 80 equals signs ('=')
The string to output between multiple test runs. Set to empty string to disable
```js
// karma.conf.js
module.exports = function(config) {
config.set({
frameworks: ['jasmine'],
// reporters configuration
reporters: ['mocha'],
// reporter options
mochaReporter: {
divider: ''
},
plugins: [
'karma-jasmine',
'karma-mocha-reporter'
]
});
};
```
### ignoreSkipped

@@ -142,2 +171,5 @@ **Type:** Boolean

## Release History
### v1.1.2
* Show a divider line between multiple test runs for clarity
### v1.1.1

@@ -144,0 +176,0 @@ * Use overwritten colors also for the log symbols

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