Skip to content

Commit

Permalink
Comments should not make exit code incorrect. Fixes #92
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcw authored and geraintwhite committed Aug 2, 2015
1 parent c388972 commit 8d04af4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function createHarness (conf_) {
inspectCode(st_);
});
st.on('result', function (r) {
if (!r.ok) test._exitCode = 1
if (!r.ok && typeof r !== 'string') test._exitCode = 1
});
})(t);

Expand Down
1 change: 1 addition & 0 deletions test/exit.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ tap.test('exit ok', function (t) {
t.same(rs, [
'TAP version 13',
'array',
'hi',
{ id: 1, ok: true, name: 'should be equivalent' },
{ id: 2, ok: true, name: 'should be equivalent' },
{ id: 3, ok: true, name: 'should be equivalent' },
Expand Down
1 change: 1 addition & 0 deletions test/exit/ok.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ var falafel = require('falafel');
var test = require('../../');

test('array', function (t) {
t.comment('hi');
t.plan(5);

var src = '(' + function () {
Expand Down

0 comments on commit 8d04af4

Please sign in to comment.