This commit is contained in:
Norbert de Langen 2020-08-19 14:16:42 +02:00
parent 7f8e6ce62e
commit 8dd67f2b84
No known key found for this signature in database
GPG Key ID: 976651DA156C2825

View File

@ -146,15 +146,6 @@ describe('Refs API', () => {
},
},
],
Array [
"https://example.com/stories.json",
Object {
"credentials": "omit",
"headers": Object {
"Accept": "application/json",
},
},
],
]
`);
});
@ -184,15 +175,6 @@ describe('Refs API', () => {
},
},
],
Array [
"https://example.com/stories.json?version=2.1.3-rc.2",
Object {
"credentials": "omit",
"headers": Object {
"Accept": "application/json",
},
},
],
]
`);
});
@ -239,15 +221,6 @@ describe('Refs API', () => {
},
},
],
Array [
"https://example.com/stories.json",
Object {
"credentials": "omit",
"headers": Object {
"Accept": "application/json",
},
},
],
]
`);
@ -322,15 +295,6 @@ describe('Refs API', () => {
},
},
],
Array [
"https://example.com/stories.json",
Object {
"credentials": "omit",
"headers": Object {
"Accept": "application/json",
},
},
],
Array [
"https://example.com/metadata.json",
Object {
@ -408,25 +372,6 @@ describe('Refs API', () => {
},
},
],
Array [
"https://example.com/stories.json",
Object {
"credentials": "omit",
"headers": Object {
"Accept": "application/json",
},
},
],
Array [
"https://example.com/metadata.json",
Object {
"cache": "no-cache",
"credentials": "omit",
"headers": Object {
"Accept": "application/json",
},
},
],
]
`);
@ -434,9 +379,18 @@ describe('Refs API', () => {
Object {
"refs": Object {
"fake": Object {
"error": undefined,
"error": Object {
"message": "Error: Loading of ref failed
at fetch (lib/api/src/modules/refs.ts)
URL: https://example.com
We weren't able to load the above URL,
it's possible a CORS error happened.
Please check your dev-tools network tab.",
},
"id": "fake",
"loginUrl": "https://example.com/login",
"ready": false,
"stories": undefined,
"title": "Fake",
@ -495,15 +449,6 @@ describe('Refs API', () => {
},
},
],
Array [
"https://example.com/stories.json",
Object {
"credentials": "omit",
"headers": Object {
"Accept": "application/json",
},
},
],
Array [
"https://example.com/metadata.json",
Object {
@ -606,12 +551,6 @@ describe('Refs API', () => {
const { api } = initRefs({ provider, store }, { runCheck: false });
setupResponses(
{
ok: false,
response: async () => {
throw new Error('Failed to fetch');
},
},
{
ok: false,
response: async () => {
@ -651,9 +590,10 @@ describe('Refs API', () => {
},
],
Array [
"https://example.com/stories.json",
"https://example.com/metadata.json",
Object {
"credentials": "omit",
"cache": "no-cache",
"credentials": "include",
"headers": Object {
"Accept": "application/json",
},
@ -666,17 +606,7 @@ describe('Refs API', () => {
Object {
"refs": Object {
"fake": Object {
"error": Object {
"message": "Error: Loading of ref failed
at fetch (lib/api/src/modules/refs.ts)
URL: https://example.com
We weren't able to load the above URL,
it's possible a CORS error happened.
Please check your dev-tools network tab.",
},
"error": [Error: not ok],
"id": "fake",
"ready": false,
"stories": undefined,