diff --git a/__tests__/plugins/gun-ipfs.test.js b/__tests__/plugins/gun-ipfs.test.js new file mode 100644 index 0000000..5f411e3 --- /dev/null +++ b/__tests__/plugins/gun-ipfs.test.js @@ -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'); + }); +});