lib/gesalakacula.js
function generateSauceLabsKarmaCustomLaunchers(config) {
  return processPlatform(config)
    .reduce(function (memo, launcher) {
      var launcherName = [
        SAUCELABS_PREFIX,
        shorty(launcher.platform),
        shorty(launcher.browserName),
        launcher.version
      ].join('_');
      memo[launcherName] = launcher;
      return memo;
    }, {});

  ////

  function shorty(str) {
    return str.indexOf(' ') === -1 ?
      // capitaliseFirstLetter
    str.charAt(0).toUpperCase() + str.slice(1) :
      // abbr
      str.match(/\b(\w)/g).join('').toUpperCase();
  }
}
function generateSauceLabsKarmaCustomLaunchers(config) {
  return processPlatform(config)
    .reduce(function (memo, launcher) {
      var launcherName = [
        SAUCELABS_PREFIX,
        shorty(launcher.platform),
        shorty(launcher.browserName),
        launcher.version
      ].join('_');
      memo[launcherName] = launcher;
      return memo;
    }, {});

  ////

  function shorty(str) {
    return str.indexOf(' ') === -1 ?
      // capitaliseFirstLetter
    str.charAt(0).toUpperCase() + str.slice(1) :
      // abbr
      str.match(/\b(\w)/g).join('').toUpperCase();
  }
}
function generateSauceLabsKarmaCustomLaunchers ( config ) { return processPlatform ( config ) . reduce ( function ( memo , launcher ) { var launcherName = [ SAUCELABS_PREFIX , shorty ( launcher . platform ) , shorty ( launcher . browserName ) , launcher . version ] . join ( '_' ) ; memo [ launcherName ] = launcher ; return memo ; } , { } ) ; //// function shorty ( str ) { return str . indexOf ( ' ' ) === - 1 ? // capitaliseFirstLetter str . charAt ( 0 ) . toUpperCase ( ) + str . slice ( 1 ) : // abbr str . match ( / \b(\w) / g ) . join ( '' ) . toUpperCase ( ) ; } }
Generate SauceLabs Karma "customLaunchers".
@param {Object} config The abstract full config to process
@returns {Object} The karma ready "customLaunchers" object.
Generate SauceLabs Karma customLaunchers .