@@ -119,7 +119,8 @@ buster.testCase("Test CLI", {
119119 "node runs" : {
120120 setUp : function ( ) {
121121 cliHelper . writeFile ( "buster.js" , "var config = module.exports;" +
122- "config.server = { environment: 'node' }" ) ;
122+ "config.server = { environment: 'node', " +
123+ "tests: ['test.js'] }" ) ;
123124 } ,
124125
125126 "loads node runner" : function ( done ) {
@@ -165,7 +166,8 @@ buster.testCase("Test CLI", {
165166 this . config = cliHelper . writeFile (
166167 "buster2.js" ,
167168 "var config = module.exports;" +
168- "config.server = { environment: 'browser' }"
169+ "config.server = { environment: 'browser', " +
170+ "tests: ['test.js'] }"
169171 ) ;
170172 this . cli = testCli . create ( this . stdout , this . stderr , {
171173 runners : this . runners ,
@@ -259,7 +261,8 @@ buster.testCase("Test CLI", {
259261 this . config = cliHelper . writeFile (
260262 "buster2.js" ,
261263 "var config = module.exports;" +
262- "config.server = { environment: 'browser' }"
264+ "config.server = { environment: 'browser', " +
265+ "tests: ['test.js'] }"
263266 ) ;
264267 } ,
265268
@@ -438,8 +441,10 @@ buster.testCase("Test CLI", {
438441 this . config = cliHelper . writeFile (
439442 "buster2.js" ,
440443 "var config = module.exports;" +
441- "config['browser tests'] = { environment: 'browser' };" +
442- "config['node tests'] = { environment: 'node' };"
444+ "config['browser tests'] = { environment: 'browser', " +
445+ "tests: ['test.js'] };" +
446+ "config['node tests'] = { environment: 'node', " +
447+ "tests: ['test.js'] };"
443448 ) ;
444449 } ,
445450
@@ -475,8 +480,14 @@ buster.testCase("Test CLI", {
475480 var callback = this . spy ( ) ;
476481 this . runners . fake = { run : this . stub ( ) . returns ( { } ) } ;
477482 this . cli . runConfigGroups ( [
478- { environment : "fake" , id : 1 , runExtensionHook : this . spy ( ) } ,
479- { environment : "fake" , id : 2 , runExtensionHook : this . spy ( ) }
483+ { environment : "fake" ,
484+ id : 1 ,
485+ runExtensionHook : this . spy ( ) ,
486+ tests : [ 'test.js' ] } ,
487+ { environment : "fake" ,
488+ id : 2 ,
489+ runExtensionHook : this . spy ( ) ,
490+ tests : [ 'test.js' ] }
480491 ] , { } , callback ) ;
481492
482493 assert . calledOnce ( this . runners . fake . run ) ;
@@ -487,8 +498,14 @@ buster.testCase("Test CLI", {
487498 var callback = this . spy ( ) ;
488499 this . runners . fake = { run : this . stub ( ) . yields ( ) . returns ( { } ) } ;
489500 this . cli . runConfigGroups ( [
490- { environment : "fake" , id : 1 , runExtensionHook : this . spy ( ) } ,
491- { environment : "fake" , id : 2 , runExtensionHook : this . spy ( ) }
501+ { environment : "fake" ,
502+ id : 1 ,
503+ runExtensionHook : this . spy ( ) ,
504+ tests : [ 'test.js' ] } ,
505+ { environment : "fake" ,
506+ id : 2 ,
507+ runExtensionHook : this . spy ( ) ,
508+ tests : [ 'test.js' ] }
492509 ] , { } , callback ) ;
493510
494511 assert . calledTwice ( this . runners . fake . run ) ;
@@ -501,7 +518,8 @@ buster.testCase("Test CLI", {
501518 this . config = cliHelper . writeFile (
502519 "buster2.js" ,
503520 "var config = module.exports;" +
504- "config.server = { environment: 'node' }"
521+ "config.server = { environment: 'node', " +
522+ "tests: ['test.js'] }"
505523 ) ;
506524 } ,
507525
@@ -528,7 +546,8 @@ buster.testCase("Test CLI", {
528546 } ;
529547 this . fakeConfig = {
530548 environment : "fake" ,
531- runExtensionHook : this . spy ( )
549+ runExtensionHook : this . spy ( ) ,
550+ tests : [ "test.js" ]
532551 } ;
533552 } ,
534553
@@ -541,10 +560,8 @@ buster.testCase("Test CLI", {
541560 "with code 0 when two test configurations pass" : function ( ) {
542561 this . results = [ [ null , { ok : true , tests : 1 } ] ,
543562 [ null , { ok : true , tests : 1 } ] ] ;
544- this . cli . runConfigGroups ( [ this . fakeConfig , {
545- environment : "fake" ,
546- runExtensionHook : this . spy ( )
547- } ] , { } , this . done ) ;
563+ this . cli . runConfigGroups ( [ this . fakeConfig ,
564+ this . fakeConfig ] , { } , this . done ) ;
548565 assert . calledOnceWith ( this . exit , 0 ) ;
549566 } ,
550567
@@ -563,10 +580,8 @@ buster.testCase("Test CLI", {
563580 "with code 1 when one of several test configus fails" : function ( ) {
564581 this . results = [ [ null , { ok : true , tests : 1 } ] ,
565582 [ null , { ok : false , tests : 1 } ] ] ;
566- this . cli . runConfigGroups ( [ this . fakeConfig , {
567- environment : "fake" ,
568- runExtensionHook : this . spy ( )
569- } ] , { } , this . done ) ;
583+ this . cli . runConfigGroups ( [ this . fakeConfig ,
584+ this . fakeConfig ] , { } , this . done ) ;
570585 assert . calledOnceWith ( this . exit , 1 ) ;
571586 } ,
572587
@@ -611,7 +626,9 @@ buster.testCase("Test CLI", {
611626 node : { run : this . stub ( ) . returns ( { } ) } ,
612627 browser : { run : this . stub ( ) . returns ( { } ) }
613628 } ;
614- this . config = { environment : "node" , runExtensionHook : this . spy ( ) } ;
629+ this . config = { environment : "node" ,
630+ runExtensionHook : this . spy ( ) ,
631+ tests : [ 'test.js' ] } ;
615632 } ,
616633
617634 "are preloaded for environment" : function ( ) {
0 commit comments