Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0e3c61f

Browse files
committed
merge karma ciconf with (regular) conf
- use process.env.CIRCLECI to determine if karma is run on CI or not - autoWatch is false on CI - singleRun is true on CI - Chrome 54 (on ubuntu 14.04) is now used on CI !!
1 parent 20a47fd commit 0e3c61f

File tree

3 files changed

+10
-50
lines changed

3 files changed

+10
-50
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"docker": "node tasks/docker.js",
3434
"pretest": "node tasks/pretest.js",
3535
"test-jasmine": "karma start test/jasmine/karma.conf.js",
36-
"citest-jasmine": "karma start test/jasmine/karma.ciconf.js",
36+
"citest-jasmine": "CIRCLECI=0 karma start test/jasmine/karma.conf.js",
3737
"test-image": "node tasks/test_image.js",
3838
"test-image-gl2d": "node tasks/test_image.js gl2d_* --queue",
3939
"test-export": "node tasks/test_export.js",

test/jasmine/karma.ciconf.js

Lines changed: 0 additions & 42 deletions
This file was deleted.

test/jasmine/karma.conf.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ var constants = require('../../tasks/util/constants');
1717

1818
var arg = process.argv[4];
1919

20+
var isCI = !!process.env.CIRCLECI;
2021
var testFileGlob = arg ? arg : 'tests/*_test.js';
2122
var isSingleSuiteRun = (arg && arg.indexOf('bundle_tests/') === -1);
2223
var isRequireJSTest = (arg && arg.indexOf('bundle_tests/requirejs') !== -1);
@@ -84,7 +85,13 @@ func.defaultConfig = {
8485
colors: true,
8586

8687
// enable / disable watching file and executing tests whenever any file changes
87-
autoWatch: true,
88+
autoWatch: !isCI,
89+
90+
// if true, Karma captures browsers, runs the tests and exits
91+
singleRun: isCI,
92+
93+
// how long will Karma wait for a message from a browser before disconnecting (30 ms)
94+
browserNoActivityTimeout: 30000,
8895

8996
// start these browsers
9097
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
@@ -103,19 +110,14 @@ func.defaultConfig = {
103110
}
104111
},
105112

106-
// Continuous Integration mode
107-
// if true, Karma captures browsers, runs the tests and exits
108-
singleRun: false,
109-
110113
browserify: {
111114
transform: ['../../tasks/util/shortcut_paths.js'],
112115
extensions: ['.js'],
113-
watch: true,
116+
watch: !isCI,
114117
debug: true
115118
}
116119
};
117120

118-
119121
// Add lib/index.js to single-suite runs,
120122
// to avoid import conflicts due to plotly.js
121123
// circular dependencies.

0 commit comments

Comments
 (0)