473f0aeeb2
Note that the majority of these changes were done automatically, by using the `gulp lint --fix` command, and the manual changes were limited to the following diff: ```diff diff --git a/test/stats/statcmp.js b/test/stats/statcmp.js index 7c4dbf1d3..22d535a5a 100644 --- a/test/stats/statcmp.js +++ b/test/stats/statcmp.js @@ -1,13 +1,7 @@ "use strict"; const fs = require("fs"); - -try { - var ttest = require("ttest"); -} catch (e) { - console.log('\nttest is not installed -- to intall, run "npm install ttest"'); - console.log("Continuing without significance test...\n"); -} +const ttest = require("ttest"); const VALID_GROUP_BYS = ["browser", "pdf", "page", "round", "stat"]; @@ -134,9 +128,7 @@ function stat(baseline, current) { if (ttest) { labels.push("Result(P<.05)"); } - let i, - row, - rows = []; + const rows = []; // collect rows and measure column widths const width = labels.map(function (s) { return s.length; @@ -146,7 +138,7 @@ function stat(baseline, current) { const key = keys[k]; const baselineMean = mean(baselineGroup[key]); const currentMean = mean(currentGroup[key]); - row = key.split(","); + const row = key.split(","); row.push( "" + baselineGroup[key].length, "" + Math.round(baselineMean), @@ -165,7 +157,7 @@ function stat(baseline, current) { row.push(""); } } - for (i = 0; i < row.length; i++) { + for (let i = 0; i < row.length; i++) { width[i] = Math.max(width[i], row[i].length); } rows.push(row); @@ -181,8 +173,8 @@ function stat(baseline, current) { console.log("-- Grouped By " + options.groupBy.join(", ") + " --"); const groupCount = options.groupBy.length; for (let r = 0; r < rows.length; r++) { - row = rows[r]; - for (i = 0; i < row.length; i++) { + const row = rows[r]; + for (let i = 0; i < row.length; i++) { row[i] = pad(row[i], width[i], i < groupCount ? "right" : "left"); } console.log(row.join(" | ")); @@ -208,5 +200,5 @@ function main() { stat(baseline, current); } -var options = parseOptions(); +const options = parseOptions(); main(); ``` |
||
---|---|---|
.. | ||
results | ||
statcmp.js |