@@ -10,7 +10,7 @@ var argv = require('yargs')
1010 type : 'boolean'
1111 } ,
1212 'force-gc' : {
13- describe : 'force gc' ,
13+ describe : 'force gc. ' ,
1414 default : false ,
1515 type : 'boolean'
1616 } ,
@@ -19,8 +19,12 @@ var argv = require('yargs')
1919 default : false
2020 } ,
2121 'browsers' : {
22- describe : 'preconfigured browsers that should be used ' ,
22+ describe : 'comma separated list of preconfigured browsers to use ' ,
2323 default : 'ChromeDesktop'
24+ } ,
25+ 'spec' : {
26+ describe : 'comma separated file patterns to test' ,
27+ default : false
2428 }
2529 } )
2630 . help ( 'ng-help' )
@@ -95,6 +99,21 @@ var BROWSER_CAPS = {
9599 }
96100} ;
97101
102+ var getBenchmarkFiles = function ( benchmark , spec ) {
103+ var specFiles = [ ] ;
104+ var perfFiles = [ ] ;
105+ if ( spec . length ) {
106+ spec . split ( ',' ) . forEach ( function ( name ) {
107+ specFiles . push ( 'dist/js/cjs/**/e2e_test/' + name )
108+ perfFiles . push ( 'dist/js/cjs/**/e2e_test/' + name )
109+ } ) ;
110+ } else {
111+ specFiles . push ( 'dist/js/cjs/**/e2e_test/**/*_spec.js' ) ;
112+ perfFiles . push ( 'dist/js/cjs/**/e2e_test/**/*_perf.js' ) ;
113+ }
114+ return benchmark ? perfFiles : specFiles . concat ( perfFiles ) ;
115+ } ;
116+
98117var config = exports . config = {
99118 // Disable waiting for Angular as we don't have an integration layer yet...
100119 // TODO(tbosch): Implement a proper debugging API for Ng2.0, remove this here
@@ -110,12 +129,7 @@ var config = exports.config = {
110129 }
111130 } ,
112131
113- specs : argv [ 'benchmark' ] ? [
114- 'dist/js/cjs/**/e2e_test/**/*_perf.js'
115- ] : [
116- 'dist/js/cjs/**/e2e_test/**/*_spec.js' ,
117- 'dist/js/cjs/**/e2e_test/**/*_perf.js'
118- ] ,
132+ specs : getBenchmarkFiles ( argv [ 'benchmark' ] , argv [ 'spec' ] ) ,
119133
120134 exclude : [
121135 'dist/js/cjs/**/node_modules/**' ,
0 commit comments