@@ -10,7 +10,8 @@ var argv = minimist(process.argv.slice(4), {
10
10
string : [ 'bundleTest' , 'width' , 'height' ] ,
11
11
'boolean' : [
12
12
'info' ,
13
- 'nowatch' , 'failFast' , 'verbose' , 'randomize' ,
13
+ 'nowatch' , 'verbose' , 'randomize' ,
14
+ 'failFast' , 'doNotFailOnEmptyTestSuite' ,
14
15
'Chrome' , 'Firefox' , 'IE11'
15
16
] ,
16
17
alias : {
@@ -19,14 +20,15 @@ var argv = minimist(process.argv.slice(4), {
19
20
'IE11' : [ 'ie11' ] ,
20
21
'bundleTest' : [ 'bundletest' , 'bundle_test' ] ,
21
22
'nowatch' : 'no-watch' ,
22
- 'failFast' : 'fail-fast'
23
+ 'failFast' : 'fail-fast' ,
23
24
} ,
24
25
'default' : {
25
26
info : false ,
26
27
nowatch : isCI ,
27
- failFast : false ,
28
28
verbose : false ,
29
29
randomize : false ,
30
+ failFast : false ,
31
+ doNotFailOnEmptyTestSuite : false ,
30
32
width : '1035' ,
31
33
height : '617'
32
34
}
@@ -64,6 +66,7 @@ if(argv.info) {
64
66
' - `--IE11` (alias -- `ie11`)`: run test in IE11 browser' ,
65
67
' - `--nowatch (dflt: `false`, `true` on CI)`: run karma w/o `autoWatch` / multiple run mode' ,
66
68
' - `--failFast` (dflt: `false`): exit karma upon first test failure' ,
69
+ ' - `--doNotFailOnEmptyTestSuite` (dflt: `false`): do not fail run when no spec are ran (either from bundle error OR tag filtering)' ,
67
70
' - `--verbose` (dflt: `false`): show test result using verbose reporter' ,
68
71
' - `--showSkipped` (dflt: `false`): show tests that are skipped' ,
69
72
' - `--randomize` (dflt: `false`): randomize test ordering (useful to detect bad test teardown)' ,
@@ -266,7 +269,11 @@ func.defaultConfig = {
266
269
suppressPassed : true ,
267
270
suppressSkipped : false ,
268
271
showSpecTiming : false
269
- }
272
+ } ,
273
+
274
+ // set to `true` e.g. for mapbox suites where:
275
+ // --tags=gl --skip-tags=noCI result in empty test run
276
+ failOnEmptyTestSuite : ! argv . doNotFailOnEmptyTestSuite
270
277
} ;
271
278
272
279
func . defaultConfig . preprocessors [ pathToCustomMatchers ] = [ 'browserify' ] ;
0 commit comments