pulled in sync tests

This commit is contained in:
Kendall Werts 2020-01-06 13:27:57 -06:00
parent 26cd3c3cc8
commit d033292784
2 changed files with 6 additions and 4 deletions

View file

@ -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"
}

View file

@ -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();