File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -55,22 +55,24 @@ this.Suite.prototype = new(function () {
55
55
// so we know when the tests are over.
56
56
// We match the keys against `matcher`, to decide
57
57
// whether or not they should be included in the test.
58
- ( function count ( tests ) {
58
+ ( function count ( tests , _match ) {
59
59
var match = false ;
60
- batch . remaining ++ ;
60
+
61
61
Object . keys ( tests ) . filter ( function ( k ) {
62
62
return k !== 'topic' ;
63
63
} ) . forEach ( function ( key ) {
64
- if ( typeof ( tests [ key ] ) === "object" ) {
65
- if ( ! ( match = count ( tests [ key ] ) ||
66
- match || vows . options . matcher . test ( key ) ) ) {
67
- delete tests [ key ] ;
68
- batch . remaining -- ;
69
- }
64
+ match = _match || matcher . test ( key ) ;
65
+
66
+ if ( typeof ( tests [ key ] ) === 'object' ) {
67
+ match = count ( tests [ key ] , match ) ;
70
68
}
71
69
} ) ;
70
+
71
+ if ( match ) { batch . remaining ++ }
72
+ else { tests . _skip = true }
73
+
72
74
return match ;
73
- } ) ( tests ) ;
75
+ } ) ( tests , false ) ;
74
76
}
75
77
batch . _remaining = batch . remaining ;
76
78
} ;
You can’t perform that action at this time.
0 commit comments