Skip to content

Commit

Permalink
Added none reporter. Version to 0.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorhakes committed Feb 13, 2016
1 parent b8a4e83 commit 68f3bbb
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ Breaking

### 0.8.1
- Updated coloring for spec reporter times

### 0.8.2
- Added `none` reporter. Useful for code coverage reports
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ var setAsap = require('setasap');
var tap = require('./lib/reporters/tap');
var dot = require('./lib/reporters/dot');
var spec = require('./lib/reporters/spec');
var none = require('./lib/reporters/none');
var chai = require('chai');
var chaiAsPromised = require('chai-as-promised');
var sinon = require('sinon');
Expand All @@ -28,7 +29,8 @@ if (argv.tap) {
var reporters = {
dot: dot,
tap: tap,
spec: spec
spec: spec,
none: none
};

chai.use(chaiAsPromised);
Expand Down
3 changes: 3 additions & 0 deletions lib/reporters/none.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
var helper = require('painless-reporter-helper');

module.exports = helper({});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "painless",
"version": "0.8.1",
"version": "0.8.2",
"description": "Super simple test framework for node and the browser",
"main": "index.js",
"bin": "./bin/painless",
Expand Down
8 changes: 7 additions & 1 deletion test/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ test('command sync -r=spec', function(t) {
});
});

test('command sync -r=none', function(t) {
exec('node examples/sync -r=none', function (error, stdout, stderr) {
t.equal(stdout, '');
t.end();
});
});

test('command sync custom reporter', function(t) {
exec('node examples/sync -r=./examples/custom-reporter', function (error, stdout, stderr) {
t.match(stdout, /simple sync pass success!\nsimple sync pass 2 success!\n/);
Expand All @@ -45,7 +52,6 @@ test('command sync -r=nyan does not exist', function(t) {
});
});


test('error sync', function(t) {
exec('node examples/sync-error', function (error, stdout, stderr) {
t.ok(error);
Expand Down

0 comments on commit 68f3bbb

Please sign in to comment.