Skip to content
This repository has been archived by the owner on Sep 25, 2019. It is now read-only.

Commit

Permalink
Fix Travis not correctly using Chrome when available 🔥
Browse files Browse the repository at this point in the history
  • Loading branch information
pirelenito committed Jul 19, 2017
1 parent 400cf4e commit 5042f7d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/configure-karma/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ const buildStandardKarmaConfig = (saguiConfig, webpackConfig) => {
usePhantomJS: true,

postDetection: function (availableBrowser) {
if (availableBrowser.indexOf('Chrome') > -1 && process.env['CHROME_BIN']) {
const isTravis = process.env['TRAVIS'] === 'true'
const isChromeAvailable = availableBrowser.indexOf('Chrome') > -1
const isTravisChromeAvailable = (process.env['TRAVIS_STACK_FEATURES'] || '').indexOf('google-chrome') !== -1

if (isChromeAvailable && (!isTravis || (isTravis && isTravisChromeAvailable))) {
return ['ChromeHeadless']
}

Expand Down

0 comments on commit 5042f7d

Please sign in to comment.