File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ function createHarness (conf_) {
27
27
28
28
var began = false ;
29
29
var only = false ;
30
+ var closed = false ;
30
31
var out = new Render ( ) ;
31
32
32
33
var test = function ( name , conf , cb ) {
@@ -37,7 +38,10 @@ function createHarness (conf_) {
37
38
if ( conf . exit !== false ) {
38
39
onexit ( function ( code ) {
39
40
t . _exit ( ) ;
40
- out . close ( ) ;
41
+ if ( ! closed ) {
42
+ closed = true
43
+ out . close ( ) ;
44
+ }
41
45
if ( ! code && ! t . _ok && ( ! only || name === only ) ) {
42
46
process . exit ( 1 ) ;
43
47
}
@@ -92,7 +96,8 @@ function createHarness (conf_) {
92
96
process . nextTick ( function ( ) {
93
97
running = false ;
94
98
if ( pending . length ) return pending . shift ( ) ( ) ;
95
- if ( count === 0 ) {
99
+ if ( count === 0 && ! closed ) {
100
+ closed = true
96
101
out . close ( ) ;
97
102
}
98
103
if ( conf . exit !== false && canExit && ! t . _ok ) {
You can’t perform that action at this time.
0 commit comments