Skip to content

Commit 0727326

Browse files
committed
Merge pull request #51 from skrustev/master
Configure Travis to run Chrome for testing.
2 parents d8c4670 + 40ac346 commit 0727326

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
language: node_js
2-
after_success: npm run test-single && npm run protractor
32
node_js:
4-
- "5"
3+
- "5"
4+
script: npm run test-single
5+
before_install:
6+
- export CHROME_BIN=chromium-browser
7+
- export DISPLAY=:99.0
8+
- sh -e /etc/init.d/xvfb start

test/karma.conf.js

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = function(config){
2-
config.set({
2+
var cfg = {
33

44
basePath : '../',
55

@@ -21,8 +21,6 @@ module.exports = function(config){
2121

2222
frameworks: ['jasmine'],
2323

24-
browsers : ['Chrome'],
25-
2624
plugins : [ 'karma-chrome-launcher', 'karma-firefox-launcher', 'karma-jasmine', 'karma-junit-reporter' ],
2725

2826
reporters: ['junit'],
@@ -31,7 +29,21 @@ module.exports = function(config){
3129
outputDir: './test_out',
3230
outputFile: 'unit.xml',
3331
suite: 'unit'
34-
}
32+
},
33+
34+
browsers : ['Chrome'],
35+
36+
customLaunchers: {
37+
Chrome_travis_ci: {
38+
base: 'Chrome',
39+
flags: ['--no-sandbox']
40+
}
41+
}
42+
};
43+
44+
if (process.env.TRAVIS) {
45+
cfg.browsers = ['Chrome_travis_ci'];
46+
}
3547

36-
});
48+
config.set(cfg);
3749
};

0 commit comments

Comments
 (0)