🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
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

to
2.2.2

10

CHANGELOG.md

@@ -0,1 +1,11 @@

<a name="2.2.2"></a>
## [2.2.2](https://github.com/litixsoft/karma-mocha-reporter/compare/v2.2.0...v2.2.2) (2017-01-19)
### Features
* add option printFirstSuccess ([9e2f342](https://github.com/litixsoft/karma-mocha-reporter/commit/9e2f342))
<a name="2.2.1"></a>

@@ -2,0 +12,0 @@ ## [2.2.1](https://github.com/litixsoft/karma-mocha-reporter/compare/v2.2.0...v2.2.1) (2016-11-18)

8

index.js

@@ -59,2 +59,5 @@ 'use strict';

// print first successful result
config.mochaReporter.printFirstSuccess = config.mochaReporter.printFirstSuccess || false;
var colors = {

@@ -538,3 +541,3 @@ success: {

if (item.count === self.numberOfBrowsers) {
if (item.count === self.numberOfBrowsers || config.mochaReporter.printFirstSuccess) {
item.isCompleted = true;

@@ -599,3 +602,4 @@

self.write('\n' + colors.success.print('Finished in ' + formatTimeInterval(self.totalTime) + ' / ' + formatTimeInterval(self.netTime)));
self.write('\n' + colors.success.print('Finished in ' + formatTimeInterval(self.totalTime) + ' / ' +
formatTimeInterval(self.netTime) + ' @ ' + new Date().toTimeString()));
self.write('\n\n');

@@ -602,0 +606,0 @@

{
"name": "karma-mocha-reporter",
"description": "Karma reporter with mocha style logging.",
"version": "2.2.1",
"version": "2.2.2",
"homepage": "http://www.litixsoft.de/index.php?lang=en#modules",

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

@@ -240,3 +240,30 @@ # karma-mocha-reporter

### printFirstSuccess
**Type:** Boolean
**Possible Values:**
* `false` (default)
* `true`
Prints the result of an it block after it is run in one browser. This options is useful when you have tests which are conditionally run in one browser only.
Otherwise the result of the it block would not be printed because it was not run in all browsers.
```js
// testfile.spec.js
if (navigator.userAgent.match(/firefox/i)) {
describe('Firefox tests', function() {
it('this would only be reported when printFirstSuccess is true', function() {
console.log('firefox test');
});
});
}
describe('Other tests', function() {
it('this should be always reported', function() {
console.log('hello world');
});
});
```
## Contributing

@@ -253,3 +280,3 @@ In lieu of a formal styleguide take care to maintain the existing coding style. Lint and test your code using [grunt](http://gruntjs.com/).

## License
Copyright (C) 2013-2016 Litixsoft GmbH <info@litixsoft.de>
Copyright (C) 2013-2017 Litixsoft GmbH <info@litixsoft.de>
Licensed under the MIT license.

@@ -256,0 +283,0 @@