File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ exports = module.exports = (function () {
23
23
} ;
24
24
25
25
lazyLoad . only = function ( ) {
26
- return getHarness . only . apply ( this , arguments ) ;
27
- }
26
+ return getHarness ( ) . only . apply ( this , arguments ) ;
27
+ } ;
28
28
29
29
lazyLoad . createStream = function ( opts ) {
30
30
if ( ! opts ) opts = { } ;
@@ -81,8 +81,10 @@ function createExitHarness (conf) {
81
81
}
82
82
83
83
if ( ! ended ) {
84
+ var only = harness . _results . _only ;
84
85
for ( var i = 0 ; i < harness . _tests . length ; i ++ ) {
85
86
var t = harness . _tests [ i ] ;
87
+ if ( only && t . name !== only ) continue ;
86
88
t . _exit ( ) ;
87
89
}
88
90
}
@@ -122,6 +124,7 @@ function createHarness (conf_) {
122
124
results . push ( t ) ;
123
125
return t ;
124
126
} ;
127
+ test . _results = results ;
125
128
126
129
test . _tests = [ ] ;
127
130
Original file line number Diff line number Diff line change @@ -175,9 +175,7 @@ function getNextTest (results) {
175
175
176
176
do {
177
177
var t = results . tests . shift ( ) ;
178
- if ( ! t ) {
179
- return null ;
180
- }
178
+ if ( ! t ) continue ;
181
179
if ( results . _only === t . name ) {
182
180
return t ;
183
181
}
You can’t perform that action at this time.
0 commit comments