fix(build): error when running `npm test` locally

Closes #3806
This commit is contained in:
Marc Laval 2015-08-24 16:24:34 +02:00
parent 21f60c5dce
commit bf4b75ee9c
1 changed files with 4 additions and 2 deletions

View File

@ -545,8 +545,10 @@ function getBrowsersFromCLI() {
var outputList = [];
for (var i = 0; i < inputList.length; i++) {
var input = inputList[i];
if (sauceConf.customLaunchers.hasOwnProperty(input)) {
//Non-sauce browsers case: overrides everything, ignoring other options
var karmaChromeLauncher = require('karma-chrome-launcher');
if (sauceConf.customLaunchers.hasOwnProperty(input) || karmaChromeLauncher.hasOwnProperty("launcher:" + input)) {
// In case of non-sauce browsers, or browsers defined in karma-chrome-launcher (Chrome, ChromeCanary and Dartium):
// overrides everything, ignoring other options
outputList = [input];
isSauce = false;
break;