working on gun-ipfs plugin and test to make the test pass

merge-requests/9/merge
Michał 'rysiek' Woźniak 2021-08-25 22:33:01 +00:00
rodzic c922f640a6
commit 96de033dde
2 zmienionych plików z 9 dodań i 2 usunięć

Wyświetl plik

@ -12,6 +12,9 @@ describe("plugin: gun-ipfs", () => {
}
}
}
self.log = function(component, ...items) {
console.debug(component + ' :: ', ...items)
}
})
test("it should register in LibResilientPlugins", () => {
require("../../plugins/gun-ipfs.js");

Wyświetl plik

@ -76,8 +76,12 @@ if (typeof window === 'undefined') {
doImport(
"./lib/ipfs.js");
self.log(config.name, 'setting up IPFS...')
ipfs = await self.Ipfs.create();
self.log(config.name, '+-- IPFS loaded :: ipfs is : ' + typeof ipfs)
try {
ipfs = await self.Ipfs.create();
self.log(config.name, '+-- IPFS loaded :: ipfs is : ' + typeof ipfs)
} catch(e) {
console.error('+-- Error loading IPFS: ' + e)
}
}
}