minor fixes (ref. #15)

merge-requests/9/merge
Michał 'rysiek' Woźniak 2021-09-15 21:29:09 +00:00
rodzic d02cbb7a9d
commit 05e7997e89
4 zmienionych plików z 9 dodań i 12 usunięć

Wyświetl plik

@ -51,7 +51,7 @@ describe("plugin: alt-fetch", () => {
} }
}) })
test("it should register in LibResilientPlugins", () => { test("it should register in LibResilientPluginConstructors", () => {
require("../../plugins/alt-fetch.js"); require("../../plugins/alt-fetch.js");
expect(LibResilientPluginConstructors.get('alt-fetch')().name).toEqual('alt-fetch'); expect(LibResilientPluginConstructors.get('alt-fetch')().name).toEqual('alt-fetch');
}); });

Wyświetl plik

@ -31,7 +31,7 @@ describe("plugin: fetch", () => {
} }
} }
}) })
test("it should register in LibResilientPlugins", () => { test("it should register in LibResilientPluginConstructors", () => {
require("../../plugins/fetch.js"); require("../../plugins/fetch.js");
expect(LibResilientPluginConstructors.get('fetch')().name).toEqual('fetch'); expect(LibResilientPluginConstructors.get('fetch')().name).toEqual('fetch');
}); });

Wyświetl plik

@ -17,8 +17,8 @@
LRPC.set(pluginName, (LR, init={})=>{ LRPC.set(pluginName, (LR, init={})=>{
/* /*
* plugin config settings * plugin config settings
*/ */
// sane defaults // sane defaults
let defaultConfig = { let defaultConfig = {
@ -60,8 +60,8 @@
/** /**
* getting content using regular HTTP(S) fetch() * getting content using regular HTTP(S) fetch()
*/ */
let fetchContentFromAlternativeEndpoints = (url) => { let fetchContentFromAlternativeEndpoints = (url) => {
// we're going to try a random endpoint and building an URL of the form: // we're going to try a random endpoint and building an URL of the form:

Wyświetl plik

@ -6,18 +6,15 @@
* this plugin does not implement any push method * this plugin does not implement any push method
*/ */
/* // no polluting of the global namespace please
* no polluting of the global namespace please
*/
(function(LRPC){ (function(LRPC){
// this never changes // this never changes
const pluginName = "fetch" const pluginName = "fetch"
LRPC.set(pluginName, (LR, init={})=>{ LRPC.set(pluginName, (LR, init={})=>{
/* /*
* plugin config settings * plugin config settings
*/ */
// sane defaults // sane defaults
let defaultConfig = {} let defaultConfig = {}