kopia lustrzana https://gitlab.com/rysiekpl/libresilient
working on gun-ipfs plugin and test to make the test pass
rodzic
c922f640a6
commit
96de033dde
|
@ -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");
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue