File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -39,8 +39,7 @@ var help = [
3939var options = {
4040 reporter : reporter ,
4141 matcher : / .* / ,
42- watch : false ,
43- error : true
42+ watch : false
4443} ;
4544
4645var files = [ ] ;
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ this.Suite = function (subject) {
1111 this . matcher = / .* / ;
1212 this . reporter = require ( 'vows/reporters/dot-matrix' ) ;
1313 this . batches = [ ] ;
14+ this . options = { error : true } ;
1415 this . reset ( ) ;
1516} ;
1617
@@ -219,9 +220,10 @@ this.Suite.prototype = new(function () {
219220
220221 options = options || { } ;
221222
222- this . matcher = options . matcher || this . matcher ;
223- this . reporter = options . reporter || this . reporter ;
224- this . options = options ;
223+ for ( var k in options ) { this . options [ k ] = options [ k ] }
224+
225+ this . matcher = this . options . matcher || this . matcher ;
226+ this . reporter = this . options . reporter || this . reporter ;
225227
226228 this . batches . forEach ( function ( batch ) {
227229 that . parseBatch ( batch , that . matcher ) ;
@@ -265,7 +267,9 @@ this.Suite.prototype = new(function () {
265267
266268 this . runParallel = function ( ) { } ;
267269
268- this . export = function ( module ) {
270+ this . export = function ( module , options ) {
271+ for ( var k in ( options || { } ) ) { this . options [ k ] = options [ k ] }
272+
269273 if ( require . main === module ) {
270274 return this . run ( ) ;
271275 } else {
You can’t perform that action at this time.
0 commit comments