Skip to content

Commit 81d85ec

Browse files
authored
Update karma.conf.js
1 parent 0e27ce2 commit 81d85ec

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

karma.conf.js

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// https://karma-runner.github.io/1.0/config/configuration-file.html
33

44
module.exports = function (config) {
5-
config.set({
5+
const configuration = {
66
basePath: '',
77
frameworks: ['jasmine', '@angular/cli'],
88
plugins: [
@@ -12,11 +12,11 @@ module.exports = function (config) {
1212
require('karma-coverage-istanbul-reporter'),
1313
require('@angular/cli/plugins/karma')
1414
],
15-
client: {
15+
client:{
1616
clearContext: false // leave Jasmine Spec Runner output visible in browser
1717
},
1818
coverageIstanbulReporter: {
19-
reports: ['html', 'lcovonly'],
19+
reports: [ 'html', 'lcovonly' ],
2020
fixWebpackSourcePaths: true
2121
},
2222
angularCli: {
@@ -28,6 +28,18 @@ module.exports = function (config) {
2828
logLevel: config.LOG_INFO,
2929
autoWatch: true,
3030
browsers: ['Chrome'],
31-
singleRun: false,
32-
});
31+
customLaunchers: {
32+
Chrome_travis_ci: {
33+
base: 'Chrome',
34+
flags: ['--no-sandbox']
35+
}
36+
},
37+
singleRun: false
38+
};
39+
40+
if (process.env.TRAVIS) {
41+
configuration.browsers = ['Chrome_travis_ci'];
42+
}
43+
44+
config.set(configuration);
3345
};

0 commit comments

Comments
 (0)