File tree 3 files changed +40
-2
lines changed
3 files changed +40
-2
lines changed Original file line number Diff line number Diff line change
1
+ var test = require ( '../' ) ;
2
+
3
+ test ( 'No cb test' ) ;
Original file line number Diff line number Diff line change @@ -178,6 +178,9 @@ Test.prototype.end = function (err) {
178
178
179
179
Test . prototype . _end = function ( err ) {
180
180
var self = this ;
181
+
182
+ if ( ! this . _cb && ! this . _todo ) this . fail ( '# TODO ' + this . name ) ;
183
+
181
184
if ( this . _progeny . length ) {
182
185
var t = this . _progeny . shift ( ) ;
183
186
t . on ( 'end' , function ( ) { self . _end ( ) ; } ) ;
Original file line number Diff line number Diff line change 1
- var test = require ( '../' ) ;
1
+ var tape = require ( '../' ) ;
2
+ var tap = require ( 'tap' ) ;
3
+ var concat = require ( 'concat-stream' ) ;
2
4
3
- test ( 'No callback.' ) ;
5
+ var stripFullStack = require ( './common' ) . stripFullStack ;
6
+
7
+ tap . test ( 'no callback' , function ( tt ) {
8
+ tt . plan ( 1 ) ;
9
+
10
+ var test = tape . createHarness ( ) ;
11
+ var tc = function ( rows ) {
12
+ var body = stripFullStack ( rows . toString ( 'utf8' ) ) ;
13
+
14
+ tt . same ( body , [
15
+ 'TAP version 13' ,
16
+ '# No callback.' ,
17
+ 'not ok 1 # TODO No callback.' ,
18
+ ' ---' ,
19
+ ' operator: fail' ,
20
+ ' stack: |-' ,
21
+ ' Error: # TODO No callback.' ,
22
+ ' [... stack stripped ...]' ,
23
+ ' ...' ,
24
+ '' ,
25
+ '1..1' ,
26
+ '# tests 1' ,
27
+ '# pass 0' ,
28
+ '# fail 1' ,
29
+ ] . join ( '\n' ) + '\n' ) ;
30
+ } ;
31
+
32
+ test . createStream ( ) . pipe ( concat ( tc ) ) ;
33
+
34
+ test ( 'No callback.' ) ;
35
+ } ) ;
You can’t perform that action at this time.
0 commit comments