kopia lustrzana https://gitlab.com/rysiekpl/libresilient
19 wiersze
503 B
JavaScript
19 wiersze
503 B
JavaScript
const makeServiceWorkerEnv = require('service-worker-mock');
|
|
|
|
describe("plugin: cache", () => {
|
|
beforeEach(() => {
|
|
Object.assign(global, makeServiceWorkerEnv());
|
|
jest.resetModules();
|
|
self.LibResilientPlugins = new Array()
|
|
self.LibResilientConfig = {
|
|
plugins: {
|
|
'cache':{}
|
|
}
|
|
}
|
|
})
|
|
test("it should register in LibResilientPlugins", () => {
|
|
require("../../plugins/cache.js");
|
|
expect(self.LibResilientPlugins[0].name).toEqual('cache');
|
|
});
|
|
});
|