Skip to content

Commit 0ded7d6

Browse files
committed
Merge pull request #168 from grit96/issue-92
Comments should not make exit code incorrect. Fixes #92
2 parents c388972 + 8d04af4 commit 0ded7d6

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ function createHarness (conf_) {
110110
inspectCode(st_);
111111
});
112112
st.on('result', function (r) {
113-
if (!r.ok) test._exitCode = 1
113+
if (!r.ok && typeof r !== 'string') test._exitCode = 1
114114
});
115115
})(t);
116116

test/exit.js

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ tap.test('exit ok', function (t) {
1818
t.same(rs, [
1919
'TAP version 13',
2020
'array',
21+
'hi',
2122
{ id: 1, ok: true, name: 'should be equivalent' },
2223
{ id: 2, ok: true, name: 'should be equivalent' },
2324
{ id: 3, ok: true, name: 'should be equivalent' },

test/exit/ok.js

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ var falafel = require('falafel');
22
var test = require('../../');
33

44
test('array', function (t) {
5+
t.comment('hi');
56
t.plan(5);
67

78
var src = '(' + function () {

0 commit comments

Comments
 (0)