<commit_before>import {
  extend,
  isNull,
  isObject,
  isString
} from 'lodash';

import { concurrent, andReturn, andThrow, call } from './promises-util';
import parseBrowsers from './parse-browsers';
import * as SauceLabs from './providers/saucelabs';
import * as BrowserStack from './providers/browserstack';


const providers = {
  [SauceLabs.name]: SauceLabs,
  [BrowserStack.name]: BrowserStack
};

/**
 * @function run
 * @access public
 * @description runs code in each of provided browsers
 *
 * @param {Object} config
 *   @property {Object} credentials
 *     @property {String} userName
 *     @property {String} accessToken
 *   @property {Object} browsers - see documentation for input of parse-browsers
 *     function
 *   @property {String} [provider='saucelabs']
 *   @property {String} [code] - valid JS code
 *   @property {Boolean} [verbose=false] - if true, prints logs about testing
 *     progress to console
 *   @property {Number} [timeout=1000] - how long to wait before gathering
 *     results (after executing code)
 *   @property {String} [url=http://blank.org] - page to open; by default it's
 *     blank, but you may wish to use some JSBin instead of providing the code
 *
 * @return {Promise<Object>} collection of results and logs for each browser
 *   (objects containing arrays grouped by names)
 */
export default function run({
  provider = 'saucelabs',
  browsers,
  code = '',
  credentials,<commit_msg>do not use SauceLabs as default provider<commit_after>import {
  extend,
  isNull,
  isObject,
  isString
} from 'lodash';

import { concurrent, andReturn, andThrow, call } from './promises-util';
import parseBrowsers from './parse-browsers';
import * as SauceLabs from './providers/saucelabs';
import * as BrowserStack from './providers/browserstack';


const providers = {
  [SauceLabs.name]: SauceLabs,
  [BrowserStack.name]: BrowserStack
};

/**
 * @function run
 * @access public
 * @description runs code in each of provided browsers
 *
 * @param {Object} config
 *   @property {Object} credentials
 *     @property {String} userName
 *     @property {String} accessToken
 *   @property {Object} browsers - see documentation for input of parse-browsers
 *     function
 *   @property {String} provider - "saucelabs" or "browserstack"
 *   @property {String} [code] - valid JS code
 *   @property {Boolean} [verbose=false] - if true, prints logs about testing
 *     progress to console
 *   @property {Number} [timeout=1000] - how long to wait before gathering
 *     results (after executing code)
 *   @property {String} [url=http://blank.org] - page to open; by default it's
 *     blank, but you may wish to use some JSBin instead of providing the code
 *
 * @return {Promise<Object>} collection of results and logs for each browser
 *   (objects containing arrays grouped by names)
 */
export default function run({
  provider,
  browsers,
  credentials,
  code = '',
{'fraction_non_alphanumeric': 0.1117948717948718, 'fraction_numerical': 0.002735042735042735, 'mean_word_length': 3.7967213114754097, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3042619', 'n_tokens_mistral': 871, 'n_tokens_neox': 845, 'n_words': 307}