gun-ipfs plugin test back from hades

merge-requests/9/merge
Michał 'rysiek' Woźniak 2021-08-25 22:32:22 +00:00
rodzic 83ece2adb2
commit c922f640a6
1 zmienionych plików z 20 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,20 @@
const makeServiceWorkerEnv = require('service-worker-mock');
describe("plugin: gun-ipfs", () => {
beforeEach(() => {
Object.assign(global, makeServiceWorkerEnv());
jest.resetModules();
self.LibResilientPlugins = new Array()
self.LibResilientConfig = {
plugins: {
'gun-ipfs':{
'gunPubkey': 'stub'
}
}
}
})
test("it should register in LibResilientPlugins", () => {
require("../../plugins/gun-ipfs.js");
expect(self.LibResilientPlugins[0].name).toEqual('gun-ipfs');
});
});