Log the CSS stress test results in the report holder
@param {Boolean} incremental Type of test. If incremental we are interested in the selectors that make us waste
more, otherwise in the ones that make us gain more
190518
function (incremental) {
        if (!reportHolder || !results) {
            return; // logging was not enabled
        }

        var table = '<table><thead><tr><th>Selector</th><th> </th><th>ms</th><th>Total</th></tr></thead><tbody>';

        // Extract the 10 slowest results
        var resultsArray = [];
        for (var res in results) {
            if (results.hasOwnProperty(res) && res !== "__baseline__") {
                resultsArray.push(results[res]);
            }
        }
        var sorted = resultsArray.sort(function (a, b) {
            if (a.baseline === b.baseline) {
                return 0;
            }

            if (incremental) {
                return a.baseline > b.baseline ? 1 : -1;
            } else {
                return a.baseline > b.baseline ? -1 : 1;
            }
        }).slice(0, 20);

        for (var i = 0, len = sorted.length; i < len; i += 1) {
            var item = sorted[i];
            table += '<tr><td style="font:11px monospace">Removing <strong>'
                    + item.name
                    + '</strong></td><td style="text-align:right">'
                    + (item.baseline > 0
                            ? '<span style="color:green">saves</span>'
                            : '<span style="color:red">adds</span>')
                    + '</td><td style="text-align:right; font:11px monospace">' + Math.abs(item.baseline) + 'ms</td>'
                    + '<td style="text-align:right; font:11px monospace">' + item.runTime + 'ms</td></tr>\n';
        }

        table += '</tbody></table><hr/>';

        // Summary
        table += '<table><tr><td style="text-align:right; font:10px monospace">Selectors Tested:</td><td style="font:10px monospace">'
                + resultsArray.length
                + '</td></tr>'
                + '<tr><td style="text-align:right; font:10px monospace">Baseline Time:</td><td style="font:10px monospace">'
                + results["__baseline__"].runTime + 'ms</td></tr>';

        style(reportHolder, {
            width : 600
        });

        logHolder.innerHTML = table;
    }
501518
function reportStatus(status, outputFile) {
  let log = [''];

  log.push('Suites ignored due to legacy guides:');
  IGNORED_EXAMPLES.filter(example => !fixmeIvyExamples.find(ex => ex.startsWith(example)))
      .forEach(function(val) { log.push('  ' + val); });

  if (argv.ivy) {
    log.push('');
    log.push('Suites ignored due to breakage with Ivy:');
    fixmeIvyExamples.forEach(function(val) { log.push('  ' + val); });
  }

  log.push('');
  log.push('Suites passed:');
  status.passed.forEach(function(val) { log.push('  ' + val); });

  if (status.failed.length == 0) {
    log.push('All tests passed');
  } else {
    log.push('Suites failed:');
    status.failed.forEach(function(val) { log.push('  ' + val); });
  }
  log.push('\nElapsed time: ' + status.elapsedTime + ' seconds');
  log = log.join('\n');
  console.log(log);
  fs.appendFileSync(outputFile, log);
}
170493
function log (type) {
  return (...message) => {
    if (!message.length) {
      return
    }

    const { colorFn, icon } = getColorFnAndIconByType(type)
    const output = ['']

    message.forEach((item, index) => {
      if (index === 0) {
        output.push(`  ${icon} ${item}`)
        return
      }

      output.push(`    ${item}`)
    })

    output.push('')

    console.log(colorFn(output.join('\n')))
  }
}
1193838
function (e, data) {
                if (e.isDefaultPrevented()) {
                    return false;
                }
                var progress = Math.floor(data.loaded / data.total * 100);
                if (data.context) {
                    data.context.each(function () {
                        $(this).find('.progress')
                            .attr('aria-valuenow', progress)
                            .children().first().css(
                                'width',
                                progress + '%'
                            );
                    });
                }
            }
403093
function logLevelClass(level) {
        if (level) {
            var first = level[0];
            if (first === 'w' || first === "W") {
                return "warning";
            }
            else if (first === 'e' || first === "E") {
                return "error";
            }
            else if (first === 'i' || first === "I") {
                return "info";
            }
            else if (first === 'd' || first === "D") {
                // we have no debug css style
                return "";
            }
        }
        return "";
    }
365384
function writeLogs(customMethods) {

	// Error level logging with a message but no error
	console.error('Testing ERROR LEVEL without actual error')
	
	// Error level logging with an error but no message
	// This shows enhanced error parsing in logging 
	console.error(new Error("some error"));

	// Error level logging with both message and error
	// This shows enhanced error parsing in logging 
	console.error('Testing ERROR LEVEL with an error', new Error("some error"));
	
	// Warn level logging
	console.warn('Testing WARN LEVEL');

	// Info level logging
	console.info('Testing INFO LEVEL');

	// Log/Debug level logging
	console.log('Testing LOG LEVEL');	
	
	if(customMethods) {
		// Log/Debug level loggin using "debug" alias (not standard but clearer)
		console.debug('Testing DEBUG (AKA LOG) LEVEL');
		
		// Verbose level logging (new level added to go beyond DEBUG)
		console.verbose('Testing TRACE LEVEL');	
	}
}
482447
function(results, options) {
        console.log('')
        console.log('Passes: ' + results.stats.passes + ' Failures: ' + results.stats.failures)
        each(results.allSuites, function(suite) {
          if (suite.ran) {
            console.group(suite.description)
            each(suite.specs, function(spec){
              var assertionCount = spec.assertions.length + ':'
              if (spec.requiresImplementation())
                console.warn(spec.description)
              else if (spec.passed())
                console.log(assertionCount + ' ' + spec.description)
              else 
                console.error(assertionCount + ' ' + spec.description + ', ' + spec.failure().message)
            })
            console.groupEnd()
          }
        })
      }
426365
function() {
      while (JSLitmus._queue.length) {
        var test = JSLitmus._queue.shift();
        JSLitmus.renderTest(test);
      }
    }
21826
function reportStatus(status, outputFile) {
  let log = [''];
  log.push('Suites passed:');
  status.passed.forEach(function (val) {
    log.push('  ' + val);
  });

  if (status.failed.length == 0) {
    log.push('All tests passed');
  } else {
    log.push('Suites failed:');
    status.failed.forEach(function (val) {
      log.push('  ' + val);
    });
  }
  log.push('\nElapsed time: ' + status.elapsedTime + ' seconds');
  log = log.join('\n');
  console.log(log);
  fs.appendFileSync(outputFile, log);
}
952519
function logResults(data)
{
	var done,output,result;
	var nextIsReady = true;
	
	while (nextIsReady)
	{
		result = data.page.results[data.page.currentIndex];
		
		if (result !== undefined)
		{
			done = data.page.done===true && data.page.currentIndex>=data.page.results.length-1;
			
			output = logResult(result, done);
			
			if (output !== "") log(output);
			if (done === true) return;
			
			data.page.currentIndex++;
		}
		else
		{
			nextIsReady = false;
		}
	}
}
769088
function rule(analyzer) {
	analyzer.setMetric('notMinified');

	/**
	 * A simple CSS minification detector
	 */
	function isMinified(css) {
		// analyze the first 1024 characters
		css = css.trim().substring(0, 1024);

		// there should be no newline in minified file
		return /\n/.test(css) === false;
	}

	analyzer.on('css', function(css) {
		analyzer.setMetric('notMinified', isMinified(css) ? 0 : 1);
	});
}
505464
function report (results) {
  const arr = []

  results.forEach(result => {
    const name = result.name
    const output = result.output
    const success = result.success

    arr.push('\n')
    arr.push(`${chalk.bold(`> ${name}:`)}\n`)
    arr.push('\n')

    if (success && !output.trim()) {
      arr.push(padding(passedMessage))
    } else {
      arr.push(padding(output))
    }

    arr.push('\n')
  })

  arr.push('\n')

  return reduceEmptyLine(arr.join(''))
}
1189250
function() {

		var result = null;

		// in production - wrap evaluation into try/catch block
		if (Lava.schema.DEBUG) {

			result = this._evaluator();

		} else {

			try {

				result = this._evaluator();

			} catch (e) {

				Lava.logException(e);

			}

		}

		return result;

	}
563866
function (test) {
        if (test.iteration >= test.cfg.repeat) {
            return completeTest(test);
        }
        test.iteration += 1;

        test.cfg.action.call(null, test.name, test.iteration - 1, generateTestCallback(test, this));
    }
391328
function reporter(session) {
	Spec.call(this, session);

	var indents = 0;

	function indent() {
		return Array(indents).join('  ');
	}

	session.on('fail', function (test) {
		++indents;
		++indents;

		var plugin = test.plugin;
		var devices = plugin && test.ctx.plugins[plugin].devices;
		var prefix = indent();
		var fmt;

		if (devices) {
			devices.each(function (device, next) {
				fmt = prefix + color('fail', 'device: ' + device.uuid);
				next();
			});
		}
		/* eslint-disable */
		cursor.CR();
		/* eslint-enable */

		// console.log(fmt);

		--indents;
		--indents;
	});
}
1030293
function(browser) {
      return runner.runJsUnitTests(options.filter, browser).then(
          function(results) {
            var failedCount = results.reduce(function(prev, item) {
              return prev + (item['pass'] ? 0 : 1);
            }, 0);
            log(results.length + ' tests, ' + failedCount + ' failure(s).');
            log('[ ' + chalk.cyan(browser) + ' ] JSUnit tests: ',
                failedCount > 0 ? chalk.red('FAILED') : chalk.green('PASSED'));
            if (failedCount > 0) {
              throw new Error();
            }
          }, finalize);
    }
1018400
function() {
    dom.hide(this.$startHelp);
    dom.hide(this.$results);
    dom.hide(this.$measureTasks);
    dom.hide(this.$measuringPrompt);
    dom.show(this.$startPrompt);
  }