Skip to content

Commit 824bb30

Browse files
committed
allow running chrome on travis
1 parent 76336ca commit 824bb30

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

karma.conf.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
'use strict';
33

44
module.exports = function (config) {
5-
config.set({
5+
var configuration = {
66

77
// base path that will be used to resolve all patterns (eg. files, exclude)
88
basePath: '',
@@ -62,11 +62,22 @@
6262
// start these browsers
6363
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
6464
browsers: ['Chrome'],
65-
65+
customLaunchers: {
66+
Chrome_travis_ci: {
67+
base: 'Chrome',
68+
flags: ['--no-sandbox']
69+
}
70+
},
6671

6772
// Continuous Integration mode
6873
// if true, Karma captures browsers, runs the tests and exits
6974
singleRun: false
7075
});
76+
77+
if (process.env.TRAVIS) {
78+
configuration.browsers = ['Chrome_travis_ci'];
79+
}
80+
81+
config.set(configuration);
7182
};
7283
}());

0 commit comments

Comments
 (0)