Skip to content

Commit

Permalink
Update travis script and karma configuration to get tests working on …
Browse files Browse the repository at this point in the history
  • Loading branch information
gldraphael committed Dec 7, 2017
1 parent d951dc3 commit df3fdd6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ node_js:
addons:
chrome: stable

before_install:
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start

branches:
only:
- master
Expand Down
19 changes: 16 additions & 3 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function (config) {
config.set({
// Our karma configuration
const configuration = {
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
plugins: [
Expand All @@ -28,6 +29,18 @@ module.exports = function (config) {
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
singleRun: false,
customLaunchers: {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
}
}

if(process.env.TRAVIS) {
configuration.browsers = ['Chrome_travis_ci'];
}

config.set(configuration);
};

0 comments on commit df3fdd6

Please sign in to comment.