-
-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: don't consider 'ok' of todo tests
- Loading branch information
Showing
2 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
var tap = require('tap'); | ||
var tape = require('../'); | ||
var concat = require('concat-stream'); | ||
|
||
var common = require('./common'); | ||
var stripFullStack = common.stripFullStack; | ||
|
||
tap.test('tape todo test', function (assert) { | ||
var test = tape.createHarness({ exit: false }); | ||
assert.plan(1); | ||
|
||
test.createStream().pipe(concat(function (body) { | ||
assert.equal( | ||
stripFullStack(body.toString('utf8')), | ||
'TAP version 13\n' | ||
+ '# failure\n' | ||
+ 'not ok 1 should be equal # TODO\n' | ||
+ ' ---\n' | ||
+ ' operator: equal\n' | ||
+ ' expected: false\n' | ||
+ ' actual: true\n' | ||
+ ' at: Test.<anonymous> ($TEST/todo_single.js:$LINE:$COL)\n' | ||
+ ' ...\n' | ||
+ '\n' | ||
+ '1..1\n' | ||
+ '# tests 1\n' | ||
+ '# pass 1\n' | ||
+ '\n' | ||
+ '# ok\n' | ||
) | ||
})); | ||
|
||
test('failure', { todo: true }, function (t) { | ||
t.equal(true, false); | ||
t.end(); | ||
}); | ||
}); |