kopia lustrzana https://gitlab.com/rysiekpl/libresilient
updated tests regarding problematic Request() init fields (ref. #23)
rodzic
646e7240a5
commit
2603596032
|
@ -217,9 +217,10 @@ describe("service-worker", () => {
|
|||
|
||||
var initTest = {
|
||||
method: "GET",
|
||||
headers: new Headers({"x-stub": "STUB"}),
|
||||
mode: "mode-stub",
|
||||
credentials: "credentials-stub",
|
||||
// TODO: ref. https://gitlab.com/rysiekpl/libresilient/-/issues/23
|
||||
//headers: new Headers({"x-stub": "STUB"}),
|
||||
//mode: "mode-stub",
|
||||
//credentials: "credentials-stub",
|
||||
cache: "cache-stub",
|
||||
referrer: "referrer-stub",
|
||||
// these are not implemented by service-worker-mock
|
||||
|
@ -727,9 +728,10 @@ describe("service-worker", () => {
|
|||
|
||||
var initTest = {
|
||||
method: "GET",
|
||||
headers: new Headers({"x-stub": "STUB"}),
|
||||
mode: "mode-stub",
|
||||
credentials: "credentials-stub",
|
||||
// TODO: ref. https://gitlab.com/rysiekpl/libresilient/-/issues/23
|
||||
//headers: new Headers({"x-stub": "STUB"}),
|
||||
//mode: "mode-stub",
|
||||
//credentials: "credentials-stub",
|
||||
cache: "cache-stub",
|
||||
referrer: "referrer-stub",
|
||||
// these are not implemented by service-worker-mock
|
||||
|
|
|
@ -418,6 +418,7 @@ let LibResilientResourceInfo = class {
|
|||
let initFromRequest = (req) => {
|
||||
return {
|
||||
method: req.method,
|
||||
// TODO: ref. https://gitlab.com/rysiekpl/libresilient/-/issues/23
|
||||
//headers: req.headers, TODO: commented out: https://stackoverflow.com/questions/32500073/request-header-field-access-control-allow-headers-is-not-allowed-by-itself-in-pr
|
||||
//mode: req.mode, TODO: commented out because mode: navigate is haram in service worker, it seems
|
||||
//credentials: req.credentials, TODO: commented out because credentials: "include" is haram if the Access-Control-Allow-Origin header is '*'
|
||||
|
|
Ładowanie…
Reference in New Issue