From c922f640a616ae3c92c90a54871d1ccbec2fdb7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=27rysiek=27=20Wo=C5=BAniak?= Date: Wed, 25 Aug 2021 22:32:22 +0000 Subject: [PATCH] gun-ipfs plugin test back from hades --- __tests__/plugins/gun-ipfs.test.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 __tests__/plugins/gun-ipfs.test.js 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'); + }); +});