Skip to content

Commit

Permalink
chore (ci): Added before_install and karma.conf settings to run karma…
Browse files Browse the repository at this point in the history
…/Chrome tests on Travis CI.
  • Loading branch information
atufkas committed Feb 19, 2018
1 parent dc8b66d commit fcc9435
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 15 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ node_js:
cache:
directories:
- "node_modules"
before_install:
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

Date: February 19, 2018

- chore (ci): Added integration with Travis CI.
- doc: Corrected dependency on angular 1.2.32, added a small section about
running test scripts and added new top note to README
- chore: corrected module dep to correct package name phantomjs-prebuilt
Expand Down
41 changes: 26 additions & 15 deletions config/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,42 @@
module.exports = function(config){
config.set({
basePath : '../',
module.exports = function(config) {
config.set({
basePath: '../',

files : [
files: [
'app/lib/angular-1.2.32/angular.js',
'app/lib/angular-1.2.32/angular-*.js',
'test/lib/angular-1.2.32/angular-mocks.js',
'app/js/**/*.js',
'test/unit/**/*.js'
],

autoWatch : true,
autoWatch: true,

frameworks: ['jasmine'],

browsers : ['Chrome'],
browsers: ['Chrome'],

plugins : [
'karma-junit-reporter',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-jasmine'
],
plugins: [
'karma-junit-reporter',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-jasmine'
],

junitReporter : {
junitReporter: {
outputFile: 'test_out/unit.xml',
suite: 'unit'
}
},

customLaunchers: {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},
});

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

0 comments on commit fcc9435

Please sign in to comment.