Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

Commit 2cbea40

Browse files
author
James Kleeh
committed
Update test config for travis
1 parent 569b0c1 commit 2cbea40

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@ node_js:
44
- "0.11"
55
- "0.10"
66
before_script:
7-
- npm install -g [email protected]
7+
- npm install -g [email protected]
8+
before_install:
9+
- export CHROME_BIN=chromium-browser
10+
- export DISPLAY=:99.0
11+
- sh -e /etc/init.d/xvfb start

test/karma.conf.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Generated on Tue Jul 14 2015 10:10:58 GMT-0400 (Eastern Daylight Time)
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: '',
@@ -61,9 +61,21 @@ module.exports = function(config) {
6161
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
6262
browsers: ['Chrome'],
6363

64+
customLaunchers: {
65+
Chrome_travis_ci: {
66+
base: 'Chrome',
67+
flags: ['--no-sandbox']
68+
}
69+
},
6470

6571
// Continuous Integration mode
6672
// if true, Karma captures browsers, runs the tests and exits
6773
singleRun: false
68-
})
74+
};
75+
76+
if(process.env.TRAVIS){
77+
configuration.browsers = ['Chrome_travis_ci'];
78+
}
79+
80+
config.set(configuration);
6981
}

0 commit comments

Comments
 (0)