Fix quotes issues in test and benchmark files

pull/471/head
Gijs Kruitbosch 6 years ago
parent f511d1aa2b
commit 30611cc57f

@ -1,4 +1,4 @@
var clean = require('matcha/lib/matcha/reporters/clean');
var clean = require("matcha/lib/matcha/reporters/clean");
function average(list) {
if (!list.length)
@ -18,20 +18,20 @@ module.exports = function(runner, utils) {
var color = utils.color;
var results = {};
var currentResults = [];
runner.on('bench end', function(benchResults) {
runner.on("bench end", function(benchResults) {
currentResults.push(benchResults.ops);
});
runner.on('suite end', function(suite) {
runner.on("suite end", function(suite) {
var avg = humanize(average(currentResults));
console.log(padBefore(avg + ' op/s', 22) + ' » ' + suite.title);
console.log(padBefore(avg + " op/s", 22) + " » " + suite.title);
console.log();
results[suite.title] = avg;
currentResults = [];
});
runner.on('end', function() {
runner.on("end", function() {
for (var k in results) {
console.log(color(padBefore(k, 30) + ': ', 'gray') + results[k] + ' op/s');
console.log(color(padBefore(k, 30) + ": ", "gray") + results[k] + " op/s");
}
console.log();
});

@ -59,7 +59,7 @@ function fetchSource(url, callbackFn) {
client = require("https");
}
var options = urlparse(url);
options.headers = {'User-Agent': FFX_UA};
options.headers = {"User-Agent": FFX_UA};
client.get(options, function(response) {
if (debug) {

@ -115,7 +115,7 @@ describe("Test JSDOM functionality", function() {
});
it("should have a working replaceChild", function() {
var parent = baseDoc.getElementsByTagName('div')[0];
var parent = baseDoc.getElementsByTagName("div")[0];
var p = baseDoc.createElement("p");
p.setAttribute("id", "my-replaced-kid");
var childCount = parent.childNodes.length;

@ -95,10 +95,10 @@ function runTestsWithItems(label, domGenerationFn, source, expectedContent, expe
function genPath(node) {
if (node.id) {
return '#' + node.id;
return "#" + node.id;
}
if (node.tagName == "BODY") {
return 'body';
return "body";
}
var parent = node.parentNode;
var parentPath = genPath(parent);

Loading…
Cancel
Save