--- a/tools/visual-diff.js Wed Mar 20 04:12:58 2019 +0000
+++ b/tools/visual-diff.js Thu Mar 21 19:35:38 2019 +0000
@@ -1,7 +1,5 @@
- config = require('./diff-config.json')
+ var config = require('./diff-config.json') @@ -33,12 +31,11 @@
tablet: Object.freeze({ width: 768, height: 4000 }),
massive: Object.freeze({ width: 1440, height: 4000 }),
+const viewportKeys = Object.keys(viewports) - const viewportKeys = Object.keys(viewports)
const pages = (await fetch_json(`${dir}/index.json`))
@@ -47,6 +44,7 @@
console.log(`Diffing these pages:`)
+ // Populates stack with tests for (const pagePath of pages) {
console.log('\t' + pagePath.trim().replace(dir, ''))
@@ -55,10 +53,12 @@
await differencify.launchBrowser({ timeout: 0 })
await differencify.cleanup()
if (nonIdentical.length) {
console.log(`Pages that have changed:`)
@@ -84,16 +84,13 @@
+ .init({ testName, timeout: 0 }) .wait(waitToScreenShotTime)
- .toMatchSnapshot({ testName })
if (!result) nonIdentical.push(`${viewportName} ${path}`)
@@ -122,7 +119,7 @@
+ * Creates a file safe string * @param {string} str Possibly unsafe url
function safeFileName(str) {
@@ -134,7 +131,7 @@
- * @param {Fucntion[]} stack The fucntions to be called
+ * @param {Function[]} stack The fucntions to be called function concurrence(stack) {
const er = e => console.error(e)