@@ -7,15 +7,16 @@ var constants = require('../../tasks/util/constants');
7
7
var isCI = ! ! process . env . CIRCLECI ;
8
8
var argv = minimist ( process . argv . slice ( 4 ) , {
9
9
string : [ 'bundleTest' , 'width' , 'height' ] ,
10
- 'boolean' : [ 'info' , 'watch ' , 'verbose' , 'Chrome' , 'Firefox' ] ,
10
+ 'boolean' : [ 'info' , 'nowatch ' , 'verbose' , 'Chrome' , 'Firefox' ] ,
11
11
alias : {
12
12
'Chrome' : 'chrome' ,
13
13
'Firefox' : [ 'firefox' , 'FF' ] ,
14
- 'bundleTest' : [ 'bundletest' , 'bundle_test' ]
14
+ 'bundleTest' : [ 'bundletest' , 'bundle_test' ] ,
15
+ 'nowatch' : 'no-watch'
15
16
} ,
16
17
'default' : {
17
18
info : false ,
18
- watch : false ,
19
+ nowatch : isCI ,
19
20
verbose : false ,
20
21
width : '1035' ,
21
22
height : '617'
@@ -28,8 +29,8 @@ if(argv.info) {
28
29
'' ,
29
30
'Examples:' ,
30
31
'' ,
31
- 'Run `axes_test.js`, `bar_test.js` and `scatter_test.js` suites in `autoWatch` / multiple run mode :' ,
32
- ' $ npm run test-jasmine -- axes bar_test.js scatter --watch ' ,
32
+ 'Run `axes_test.js`, `bar_test.js` and `scatter_test.js` suites w/o `autoWatch`:' ,
33
+ ' $ npm run test-jasmine -- axes bar_test.js scatter --nowatch ' ,
33
34
'' ,
34
35
'Run all tests with the `noCI` tag on Firefox in a 1500px wide window:' ,
35
36
' $ npm run test-jasmine -- --tags=noCI --FF --width=1500' ,
@@ -47,7 +48,7 @@ if(argv.info) {
47
48
' - `--info`: show this info message' ,
48
49
' - `--Chrome` (alias `--chrome`): run test in (our custom) Chrome browser' ,
49
50
' - `--Firefox` (alias `--FF`, `--firefox`): run test in (our custom) Firefox browser' ,
50
- ' - `--watch (dflt: `false`)`: run karma in `autoWatch` / multiple run mode' ,
51
+ ' - `--nowatch (dflt: `false`, `true` on CI )`: run karma w/o `autoWatch` / multiple run mode' ,
51
52
' - `--verbose` (dflt: `false`): show test result using verbose reporter' ,
52
53
' - `--tags`: run only test with given tags (using the `jasmine-spec-tags` framework)' ,
53
54
' - `--width`(dflt: 1035): set width of the browser window' ,
@@ -158,10 +159,10 @@ func.defaultConfig = {
158
159
colors : true ,
159
160
160
161
// enable / disable watching file and executing tests whenever any file changes
161
- autoWatch : argv . watch ,
162
+ autoWatch : ! argv . nowatch ,
162
163
163
164
// if true, Karma captures browsers, runs the tests and exits
164
- singleRun : ! argv . watch ,
165
+ singleRun : argv . nowatch ,
165
166
166
167
// how long will Karma wait for a message from a browser before disconnecting (30 ms)
167
168
browserNoActivityTimeout : 30000 ,
@@ -194,7 +195,7 @@ func.defaultConfig = {
194
195
browserify : {
195
196
transform : [ pathToShortcutPath ] ,
196
197
extensions : [ '.js' ] ,
197
- watch : argv . watch ,
198
+ watch : ! argv . nowatch ,
198
199
debug : true
199
200
} ,
200
201
0 commit comments