kopia lustrzana https://gitlab.com/rysiekpl/libresilient
cleaner tests
rodzic
3bb3124e44
commit
3f9455b29b
|
@ -1,17 +1,18 @@
|
|||
var self = self || global;
|
||||
|
||||
self.LibResilientPlugins = new Array()
|
||||
|
||||
self.LibResilientConfig = {
|
||||
plugins: {
|
||||
'fetch':{}
|
||||
}
|
||||
}
|
||||
|
||||
const fetchPlugin = require("../../plugins/fetch.js");
|
||||
const makeServiceWorkerEnv = require('service-worker-mock');
|
||||
|
||||
describe("fetch() plugin", () => {
|
||||
beforeEach(() => {
|
||||
Object.assign(global, makeServiceWorkerEnv());
|
||||
jest.resetModules();
|
||||
self.LibResilientPlugins = new Array()
|
||||
self.LibResilientConfig = {
|
||||
plugins: {
|
||||
'fetch':{}
|
||||
}
|
||||
}
|
||||
})
|
||||
test("it should register in LibResilientPlugins", () => {
|
||||
require("../../plugins/fetch.js");
|
||||
expect(self.LibResilientPlugins[0].name).toEqual('fetch');
|
||||
});
|
||||
});
|
||||
|
|
Plik diff jest za duży
Load Diff
|
@ -2,8 +2,6 @@
|
|||
|* === Regular HTTP(S) fetch() plugin === *|
|
||||
\* ========================================================================= */
|
||||
|
||||
var self = self || global;
|
||||
|
||||
/**
|
||||
* this plugin does not implement any push method
|
||||
*/
|
||||
|
|
Ładowanie…
Reference in New Issue