File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ export class TestBrokerViewModel extends observable.Observable {
153153 var connected = this . updateBanner ( 'connected' ) ;
154154
155155 socket . on ( 'connect' , err => {
156- console . log ( 'UTR : successfully connected to karma' ) ;
156+ console . log ( 'NSUTR : successfully connected to karma' ) ;
157157
158158 connected ( ) ;
159159
@@ -233,11 +233,13 @@ export class TestBrokerViewModel extends observable.Observable {
233233 }
234234 } ) ) ;
235235 } )
236- . then ( scriptsContents => setTimeout ( ( ) => this . runTests ( scriptsContents ) , 0 ) ) ;
236+ . then ( ( scriptsContents : IScriptInfo [ ] ) => setTimeout ( ( ) => this . runTests ( scriptsContents ) , 0 ) ) ;
237237 }
238238
239- public runTests ( testScripts ) {
240- testScripts . forEach ( ( script , i ) => {
239+ public runTests ( testScripts : IScriptInfo [ ] ) : void {
240+ testScripts
241+ . filter ( script => this . isTestScript ( script . url ) )
242+ . forEach ( script => {
241243 if ( script . localPath ) {
242244 console . log ( 'NSUTR: require script ' + script . url + ' from ' + script . localPath ) ;
243245 require ( script . localPath ) ;
@@ -255,6 +257,10 @@ export class TestBrokerViewModel extends observable.Observable {
255257 this . start ( this . config ) ;
256258 }
257259
260+ private isTestScript ( url : string ) : boolean {
261+ return url . startsWith ( '/base/app/tests/' ) || ! url . startsWith ( '/base/app/' ) ;
262+ }
263+
258264 public updateBrowsersInfo ( browsers ) {
259265 //console.dir(browsers);
260266 }
You can’t perform that action at this time.
0 commit comments