karma-brief-reporter
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -8,3 +8,3 @@ 'use strict' | ||
let tabs = function (depth) { | ||
return clc.right(depth * tab + 1) | ||
return clc.move.right(depth * tab + 1) | ||
} | ||
@@ -11,0 +11,0 @@ |
{ | ||
"name": "karma-brief-reporter", | ||
"description": "Reports test progress statistics and lists failures at the end of a Karma test run.", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"homepage": "https://github.com/prantlf/karma-brief-reporter", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -15,2 +15,9 @@ [![npm version](https://badge.fury.io/js/karma-brief-reporter.svg)](http://badge.fury.io/js/karma-brief-reporter) | ||
- [Examples](#xamples) | ||
- [Installation](#installation) | ||
- [Options](#options) | ||
- [Notes](#notes) | ||
- [Contributing](#contributing) | ||
- [License](#license) | ||
Examples | ||
@@ -34,4 +41,4 @@ -------- | ||
http://requirejs.org/docs/errors.html#scripterror | ||
at makeError (http://localhost:9876/base/node_modules/requirejs/require.js?242a935a7049803efaaa891de70075a8d6432d9b:168:17) | ||
at HTMLScriptElement.onScriptError (http://localhost:9876/base/node_modules/requirejs/require.js?242a935a7049803efaaa891de70075a8d6432d9b:1738:36) | ||
at makeError (http://localhost:9876/base/node_modules/requirejs/require.js:168:17) | ||
at HTMLScriptElement.onScriptError (http://localhost:9876/base/node_modules/requirejs/require.js:1738:36) | ||
``` | ||
@@ -104,2 +111,16 @@ | ||
Notes | ||
----- | ||
**For [Grunt] users:** if you use this reporter with the [grunt-karma] task executed via the [grunt-subgrunt] task, do not run `grunt-karma` tasks in parallel. Progress of multiple tests will be written together and appear as a garbage more than usual, because the brief progress is rewritten on a single line using a special cursor movement character. Do not let `grunt-subgrunt` scale on the available CPU count: | ||
```js | ||
subgrunt: { | ||
options: { | ||
// Do not run subtasks concurrently on multiple CPUs. | ||
limit: 1 | ||
} | ||
} | ||
``` | ||
Contributing | ||
@@ -119,1 +140,4 @@ ------------ | ||
[Mocha reporter]: https://github.com/litixsoft/karma-mocha-reporter | ||
[Grunt]: https://gruntjs.com/ | ||
[grunt-karma]: https://github.com/karma-runner/grunt-karma | ||
[grunt-subgrunt]: https://github.com/tusbar/grunt-subgrunt |
@@ -26,3 +26,5 @@ /* eslint-env mocha */ | ||
'green': sinon.stub(), | ||
'right': sinon.stub(), | ||
'move': { | ||
'right': sinon.stub() | ||
}, | ||
'blackBright': sinon.stub(), | ||
@@ -171,3 +173,3 @@ 'white': sinon.stub(), | ||
clcFake.right.returns(tab) | ||
clcFake.move.right.returns(tab) | ||
clcFake.yellow.withArgs(pad(stats.total.toString(), 5, ' ') + ' total ').returns('yellow>' + stats.total) | ||
@@ -174,0 +176,0 @@ clcFake.green.withArgs(pad(stats.success.toString(), 5, ' ') + ' passed').returns('green>' + stats.success) |
@@ -23,3 +23,5 @@ /* eslint-env mocha */ | ||
clcFake = { | ||
'right': sinon.stub(), | ||
'move': { | ||
'right': sinon.stub() | ||
}, | ||
'white': sinon.stub(), | ||
@@ -35,3 +37,3 @@ 'red': sinon.stub(), | ||
clcFake.right.returns(right) | ||
clcFake.move.right.returns(right) | ||
@@ -105,4 +107,4 @@ types = rewire('../lib/data/types') | ||
eq(expected, actual) | ||
ok(clcFake.right.calledOnce) | ||
ok(clcFake.right.calledWithExactly(suite.depth * tab + 1)) | ||
ok(clcFake.move.right.calledOnce) | ||
ok(clcFake.move.right.calledWithExactly(suite.depth * tab + 1)) | ||
ok(clcFake.white.calledOnce) | ||
@@ -147,4 +149,4 @@ ok(clcFake.white.calledWithExactly(name)) | ||
eq(expected, actual) | ||
ok(clcFake.right.calledOnce) | ||
ok(clcFake.right.calledWithExactly(depth * tab + 1)) | ||
ok(clcFake.move.right.calledOnce) | ||
ok(clcFake.move.right.calledWithExactly(depth * tab + 1)) | ||
ok(clcFake.red.calledOnce) | ||
@@ -174,10 +176,10 @@ ok(clcFake.red.calledWithExactly(name)) | ||
it('should call clc.right as expected when toString is called', function () { | ||
it('should call clc.move.right as expected when toString is called', function () { | ||
browser.toString() | ||
eq(4, clcFake.right.callCount) | ||
ok(clcFake.right.getCall(0).calledWithExactly(depth * tab + 1)) | ||
ok(clcFake.right.getCall(1).calledWithExactly((depth + 1) * tab + 1)) | ||
ok(clcFake.right.getCall(2).calledWithExactly((depth + 2) * tab + 1)) | ||
ok(clcFake.right.getCall(3).calledWithExactly((depth + 2) * tab + 1)) | ||
eq(4, clcFake.move.right.callCount) | ||
ok(clcFake.move.right.getCall(0).calledWithExactly(depth * tab + 1)) | ||
ok(clcFake.move.right.getCall(1).calledWithExactly((depth + 1) * tab + 1)) | ||
ok(clcFake.move.right.getCall(2).calledWithExactly((depth + 2) * tab + 1)) | ||
ok(clcFake.move.right.getCall(3).calledWithExactly((depth + 2) * tab + 1)) | ||
}) | ||
@@ -184,0 +186,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53440
1368
140