text: var envIndex = process.argv.indexOf('--env') + 1;
  var env = envIndex ? process.argv[envIndex] : undefined;
  
  module.exports = {
    registerHooks: function(context) {
      const saucelabsPlatformsMobile = [
        'iOS Simulator/iphone@12.2',
        'iOS Simulator/iphone@10.3'
      ];
  
      const saucelabsPlatformsMicrosoft = [
        'Windows 10/microsoftedge@18',
        'Windows 10/internet explorer@11'
      ];
  
      const saucelabsPlatformsDesktop = [
        'macOS 10.13/safari@latest'
      ];
  
      const saucelabsPlatforms = [
        ...saucelabsPlatformsMobile,
        ...saucelabsPlatformsMicrosoft,
        ...saucelabsPlatformsDesktop
      ];
  
      const cronPlatforms = [
        {
          deviceName: 'Android GoogleAPI Emulator',
          platformName: 'Android',
          platformVersion: '8.1',
          browserName: 'chrome'
        },
        'iOS Simulator/ipad@12.2',
        'iOS Simulator/iphone@10.3',
        'Windows 10/chrome@latest',
        'Windows 10/firefox@latest'
      ];
  
      if (env === 'saucelabs') {
        context.options.plugins.sauce.browsers = saucelabsPlatforms;
      } else if (env === 'saucelabs-cron') {
        context.options.plugins.sauce.browsers = cronPlatforms;
      }
    }
  };
  