Skip to content

Commit

Permalink
added chrome tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wheresrhys committed May 4, 2015
1 parent d61661a commit 3e3a045
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ script: npm test
node_js:
- '0.12'
before_install:
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- npm install -g bower
- bower install
before_deploy:
Expand Down
22 changes: 18 additions & 4 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

module.exports = function(karma) {
karma.set({
var configuration = {

frameworks: [ 'mocha', 'chai', 'browserify'],
files: [
Expand All @@ -15,6 +15,20 @@ module.exports = function(karma) {
transform: ['debowerify'],
debug: true
},
browsers: ['PhantomJS'],
});
};
browsers: ['PhantomJS', 'Chrome'],
customLaunchers: {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
}
};

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

karma.set(configuration);

};

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"karma": "^0.12.31",
"karma-browserify": "^4.1.2",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^0.1.8",
"karma-mocha": "^0.1.10",
"karma-phantomjs-launcher": "^0.1.4",
"mocha": "^2.2.4",
Expand Down

0 comments on commit 3e3a045

Please sign in to comment.