File tree 2 files changed +38
-1
lines changed
2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ function createHarness(conf_) {
118
118
inspectCode ( st_ ) ;
119
119
} ) ;
120
120
st . on ( 'result' , function ( r ) {
121
- if ( ! r . ok && typeof r !== 'string' ) test . _exitCode = 1
121
+ if ( ! r . todo && ! r . ok && typeof r !== 'string' ) test . _exitCode = 1
122
122
} ) ;
123
123
} ) ( t ) ;
124
124
Original file line number Diff line number Diff line change
1
+ var tap = require ( 'tap' ) ;
2
+ var tape = require ( '../' ) ;
3
+ var concat = require ( 'concat-stream' ) ;
4
+
5
+ var common = require ( './common' ) ;
6
+ var stripFullStack = common . stripFullStack ;
7
+
8
+ tap . test ( 'tape todo test' , function ( assert ) {
9
+ var test = tape . createHarness ( { exit : false } ) ;
10
+ assert . plan ( 1 ) ;
11
+
12
+ test . createStream ( ) . pipe ( concat ( function ( body ) {
13
+ assert . equal (
14
+ stripFullStack ( body . toString ( 'utf8' ) ) ,
15
+ 'TAP version 13\n'
16
+ + '# failure\n'
17
+ + 'not ok 1 should be equal # TODO\n'
18
+ + ' ---\n'
19
+ + ' operator: equal\n'
20
+ + ' expected: false\n'
21
+ + ' actual: true\n'
22
+ + ' at: Test.<anonymous> ($TEST/todo_single.js:$LINE:$COL)\n'
23
+ + ' ...\n'
24
+ + '\n'
25
+ + '1..1\n'
26
+ + '# tests 1\n'
27
+ + '# pass 1\n'
28
+ + '\n'
29
+ + '# ok\n'
30
+ )
31
+ } ) ) ;
32
+
33
+ test ( 'failure' , { todo : true } , function ( t ) {
34
+ t . equal ( true , false ) ;
35
+ t . end ( ) ;
36
+ } ) ;
37
+ } ) ;
You can’t perform that action at this time.
0 commit comments