diff --git a/lib/converter.js b/lib/converter.js
index ae7ddf9..4418d30 100644
--- a/lib/converter.js
+++ b/lib/converter.js
@@ -55,9 +55,6 @@ function converter(options) {
testCase = newTest('Default');
}
- if(!assert.ok) {
- exitCode = 1;
- }
testCase.asserts.push(assert);
});
@@ -95,6 +92,9 @@ function converter(options) {
testSuites.forEach(function(suite) {
suite.asserts.forEach(function(a) {
a.skip = a.skip || a.todo;
+ if (!a.ok && !a.skip) {
+ exitCode = 1;
+ }
});
});
diff --git a/package.json b/package.json
index b7b41f0..0bed99a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "tap-xunit",
- "version": "1.6.0",
+ "version": "1.7.0",
"description": "TAP to xUnit XML converter.",
"main": "lib/converter.js",
"bin": {
diff --git a/test/expected/pass/only-skip-todo-failures b/test/expected/pass/only-skip-todo-failures
new file mode 100644
index 0000000..d543c9e
--- /dev/null
+++ b/test/expected/pass/only-skip-todo-failures
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/input/pass/only-skip-todo-failures b/test/input/pass/only-skip-todo-failures
new file mode 100644
index 0000000..a10a363
--- /dev/null
+++ b/test/input/pass/only-skip-todo-failures
@@ -0,0 +1,22 @@
+TAP version 13
+# passing-with-skip-todo
+ok 1 passing
+not ok 2 failing but skipped # SKIP
+ ---
+ operator: ok
+ expected: true
+ actual: false
+ at: Test. (/Users/aghassemi/github/tape/test.js:6:5)
+ ...
+not ok 3 failing but todo # TODO
+ ---
+ operator: ok
+ expected: true
+ actual: false
+ at: Test. (/Users/aghassemi/github/tape/test.js:7:5)
+ ...
+
+1..3
+# tests 3
+# pass 1
+# fail 2