File tree 2 files changed +20
-0
lines changed
2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ exports = module.exports = (function () {
35
35
}
36
36
return harness . createStream ( opts ) ;
37
37
} ;
38
+
39
+ lazyLoad . tearDown = function ( ) {
40
+ return getHarness ( ) . tearDown . apply ( this , arguments ) ;
41
+ } ;
38
42
39
43
lazyLoad . getHarness = getHarness
40
44
@@ -126,6 +130,10 @@ function createHarness (conf_) {
126
130
test . createStream = function ( opts ) {
127
131
return results . createStream ( opts ) ;
128
132
} ;
133
+
134
+ test . tearDown = function ( cb ) {
135
+ results . on ( 'done' , cb ) ;
136
+ } ;
129
137
130
138
var only = false ;
131
139
test . only = function ( name ) {
Original file line number Diff line number Diff line change
1
+ var tap = require ( "tap" ) ;
2
+ var tape = require ( "../" ) ;
3
+
4
+ tap . test ( "tear down" , { timeout : 1000 } , function ( tt ) {
5
+ tt . plan ( 1 ) ;
6
+ tape . tearDown ( function ( ) {
7
+ tt . pass ( 'tape ended' ) ;
8
+ } ) ;
9
+ tape ( 'dummy test' , function ( t ) {
10
+ t . end ( ) ;
11
+ } ) ;
12
+ } ) ;
You can’t perform that action at this time.
0 commit comments