From d0332927842c5b47cbbd5e0bdd56304c7ff95cae Mon Sep 17 00:00:00 2001 From: Kendall Werts Date: Mon, 6 Jan 2020 13:27:57 -0600 Subject: [PATCH] pulled in sync tests --- package.json | 2 +- src/js/background/sync.js | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 85d20e9..6a2d979 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "package": "rm -rf src/web-ext-artifacts && npm run build && mv src/web-ext-artifacts/firefox_multi-account_containers-*.zip addon.xpi", "test": "npm run lint && npm run coverage", "mocha": "mocha ./test/setup.js test/**/*.test.js", - "mochaSingle": "mocha", + "mochaSingle": "mocha ./test/setup.js", "test-watch": "mocha ./test/setup.js test/**/*.test.js --watch", "coverage": "nyc --reporter=html --reporter=text mocha ./test/setup.js test/**/*.test.js --timeout 60000" } diff --git a/src/js/background/sync.js b/src/js/background/sync.js index 7a0dd80..a8c8a40 100644 --- a/src/js/background/sync.js +++ b/src/js/background/sync.js @@ -1,4 +1,4 @@ -const SYNC_DEBUG = true; +const SYNC_DEBUG = false; const sync = { storageArea: { @@ -153,8 +153,10 @@ const sync = { async initSync() { const syncInfo = await sync.storageArea.get(); const localInfo = await browser.storage.local.get(); - console.log("inSync: ", syncInfo); - console.log("inLocal: ", localInfo); + if (SYNC_DEBUG) { + console.log("inSync: ", syncInfo); + console.log("inLocal: ", localInfo); + } const beenSynced = await assignManager.storageArea.getSynced(); if (beenSynced){ runSync();