Built motion from commit 1038d87.|0.0.141
[motion.git] / public / bower_components / lodash / test / saucelabs.js
index d10a313..d962064 100644 (file)
@@ -97,18 +97,17 @@ var browserNameMap = {
   'googlechrome': 'Chrome',
   'iehta': 'Internet Explorer',
   'ipad': 'iPad',
-  'iphone': 'iPhone',
-  'microsoftedge': 'Edge'
+  'iphone': 'iPhone'
 };
 
 /** List of platforms to load the runner on. */
 var platforms = [
   ['Linux', 'android', '5.1'],
-  ['Windows 10', 'chrome', '49'],
   ['Windows 10', 'chrome', '48'],
-  ['Windows 10', 'firefox', '45'],
+  ['Windows 10', 'chrome', '47'],
   ['Windows 10', 'firefox', '44'],
-  ['Windows 10', 'microsoftedge', '13'],
+  ['Windows 10', 'firefox', '43'],
+  ['Windows 10', 'microsoftedge', '20.10240'],
   ['Windows 10', 'internet explorer', '11'],
   ['Windows 8', 'internet explorer', '10'],
   ['Windows 7', 'internet explorer', '9'],
@@ -214,7 +213,18 @@ if (tunneled) {
  * @returns {string} Returns the formal browser name.
  */
 function browserName(identifier) {
-  return browserNameMap[identifier] || _.startCase(identifier);
+  return browserNameMap[identifier] || capitalizeWords(identifier);
+}
+
+/**
+ * Capitalizes the first character of each word in `string`.
+ *
+ * @private
+ * @param {string} string The string to augment.
+ * @returns {string} Returns the augmented string.
+ */
+function capitalizeWords(string) {
+  return _.map(string.split(' '), _.capitalize).join(' ');
 }
 
 /**
@@ -440,7 +450,7 @@ function onJobStatus(error, res, body) {
     this._pollerId = _.delay(_.bind(this.status, this), this.statusInterval * 1000);
     return;
   }
-  var description = browserName(platform[1]) + ' ' + platform[2] + ' on ' + _.startCase(platform[0]),
+  var description = browserName(platform[1]) + ' ' + platform[2] + ' on ' + capitalizeWords(platform[0]),
       errored = !jobResult || !jobResult.passed || reError.test(message) || reError.test(jobStatus),
       failures = _.result(jobResult, 'failed'),
       label = options.name + ':',
@@ -591,7 +601,7 @@ Job.prototype.restart = function(callback) {
 
   var options = this.options,
       platform = options.platforms[0],
-      description = browserName(platform[1]) + ' ' + platform[2] + ' on ' + _.startCase(platform[0]),
+      description = browserName(platform[1]) + ' ' + platform[2] + ' on ' + capitalizeWords(platform[0]),
       label = options.name + ':';
 
   logInline();
@@ -816,16 +826,13 @@ Tunnel.prototype.start = function(callback) {
  * @param {Object} Returns the tunnel instance.
  */
 Tunnel.prototype.dequeue = function() {
-  var count = 0,
-      jobs = this.jobs,
+  var jobs = this.jobs,
       active = jobs.active,
       queue = jobs.queue,
       throttled = this.throttled;
 
   while (queue.length && (active.length < throttled)) {
-    var job = queue.shift();
-    active.push(job);
-    _.delay(_.bind(job.start, job), ++count * 1000);
+    active.push(queue.shift().start());
   }
   return this;
 };