<commit_before>/* jshint esversion: 6 */
'use strict';

var series = require('async/series');
var webdriver = require('wd');
var SauceLabs = require('saucelabs');

// status of tests on all platforms
var allPlatformsPassed = true;

// amount of time between polling Sauce Labs Job (ms)
var statusPollingInterval = 10000;

// timeout if nothing happens in 300 seconds
var idleTimeout = 300;

// sauce labs account
var account = new SauceLabs({
	username: process.env.SAUCE_USERNAME,
	password: process.env.SAUCE_ACCESS_KEY
});

// https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities
var platforms = [{
	browserName: 'firefox',
	platform: 'Windows 10',
	version: '49.0'
}, {
	browserName: 'googlechrome',
	platform: 'Windows 10'
}, {
	browserName: 'safari',
	platform: 'OS X 10.11',
	version: '10.0'
}, {
	browserName: 'internet explorer',
	platform: 'Windows 10',
	version: '11.0'
}, {
	browserName: 'internet explorer',
	platform: 'Windows 8',
	version: '10.0'
}, {
	browserName: 'internet explorer',
	platform: 'Windows 7',
	version: '9'
}, {
	browserName: 'Safari',
	'appium-version': '1.6.0',
	platformName: 'iOS',
	platformVersion: '10.0',
	deviceName: 'iPhone 7 Simulator'
}, {
	browserName: 'MicrosoftEdge',
	platform: 'Windows 10'
}];

// add properties to all platforms
platforms.forEach((platform) => {
	var name = 'qunit tests - ';

	name += platform.deviceName ? platform.deviceName + ' ' : '';
	name += platform.platform ? platform.platform + ' ' : '';
	name += platform.platformName ? platform.platformName + ' ' : '';
	name += platform.platformVersion ? platform.platformVersion + ' ' : '';
	name += platform.browserName ? platform.browserName + ' ' : '';
	name += platform.version ? platform.version + ' ' : '';

	Object.assign(platform, {
		name: name,

		// https://wiki.saucelabs.com/display/DOCS/Test+Configuration+Options#TestConfigurationOptions-MaximumTestDuration
		maxDuration: 1800,// seconds, default 1800, max 10800<commit_msg>reordering sauce labs so platforms that are more likely to fail run first<commit_after>/* jshint esversion: 6 */
'use strict';

var series = require('async/series');
var webdriver = require('wd');
var SauceLabs = require('saucelabs');

// status of tests on all platforms
var allPlatformsPassed = true;

// amount of time between polling Sauce Labs Job (ms)
var statusPollingInterval = 10000;

// timeout if nothing happens in 300 seconds
var idleTimeout = 300;

// sauce labs account
var account = new SauceLabs({
	username: process.env.SAUCE_USERNAME,
	password: <PASSWORD>_ACCESS_KEY
});

// https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities
var platforms = [{
	browserName: 'internet explorer',
	platform: 'Windows 7',
	version: '9'
}, {
	browserName: 'internet explorer',
	platform: 'Windows 8',
	version: '10.0'
}, {
	browserName: 'internet explorer',
	platform: 'Windows 10',
	version: '11.0'
}, {
	browserName: 'safari',
	platform: 'OS X 10.11',
	version: '10.0'
}, {
	browserName: 'MicrosoftEdge',
	platform: 'Windows 10'
}, {
	browserName: 'firefox',
	platform: 'Windows 10',
	version: '49.0'
}, {
	browserName: 'googlechrome',
	platform: 'Windows 10'
}, {
	browserName: 'Safari',
	'appium-version': '1.6.0',
	platformName: 'iOS',
	platformVersion: '10.0',
	deviceName: 'iPhone 7 Simulator'
}];

// add properties to all platforms
platforms.forEach((platform) => {
	var name = 'qunit tests - ';

	name += platform.deviceName ? platform.deviceName + ' ' : '';
	name += platform.platform ? platform.platform + ' ' : '';
	name += platform.platformName ? platform.platformName + ' ' : '';
	name += platform.platformVersion ? platform.platformVersion + ' ' : '';
	name += platform.browserName ? platform.browserName + ' ' : '';
	name += platform.version ? platform.version + ' ' : '';

	Object.assign(platform, {
		name: name,

		// https://wiki.saucelabs.com/display/DOCS/Test+Configuration+Options#TestConfigurationOptions-MaximumTestDuration
		maxDuration: 1800,// seconds, default 1800, max 10800
{'fraction_non_alphanumeric': 0.15407779171894606, 'fraction_numerical': 0.029611041405269763, 'mean_word_length': 4.5748251748251745, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 6, 'https://': 4, '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': '7624623', 'n_tokens_mistral': 1407, 'n_tokens_neox': 1276, 'n_words': 331}