Skip to content
Snippets Groups Projects
Commit 904ac710 authored by Malte Finsterwalder's avatar Malte Finsterwalder
Browse files

HOLI-3881 unify servier config

parent c29512b5
No related branches found
No related tags found
No related merge requests found
...@@ -136,6 +136,15 @@ const serverConfigMock: ServerConfig = { ...@@ -136,6 +136,15 @@ const serverConfigMock: ServerConfig = {
fake: false, fake: false,
}; };
const noCacheServerConfig = {
cacheEnabled: false,
voltastics: voltasticsConfigMock,
imageProxyBaseUrl: serverConfigMock.imageProxyBaseUrl,
port: 0,
cacheTtlMsVoltastics: 0,
fake: false,
};
describe("voltastics", () => { describe("voltastics", () => {
let fetchStub: Stub; let fetchStub: Stub;
...@@ -197,14 +206,7 @@ describe("voltastics", () => { ...@@ -197,14 +206,7 @@ describe("voltastics", () => {
it("correctly parses engagement list", async () => { it("correctly parses engagement list", async () => {
fetchStub = stubFetch(validEngagementsResponse); fetchStub = stubFetch(validEngagementsResponse);
const graphQLServer = createGraphQLServer({ const graphQLServer = createGraphQLServer(noCacheServerConfig);
cacheEnabled: false,
voltastics: voltasticsConfigMock,
imageProxyBaseUrl: serverConfigMock.imageProxyBaseUrl,
port: 0,
cacheTtlMsVoltastics: 0,
fake: false,
});
const result = await queryEngagementOpportunities(graphQLServer); const result = await queryEngagementOpportunities(graphQLServer);
...@@ -259,14 +261,7 @@ describe("voltastics", () => { ...@@ -259,14 +261,7 @@ describe("voltastics", () => {
it("correctly parses engagement", async () => { it("correctly parses engagement", async () => {
fetchStub = stubFetch(apiSearchEngagement1); fetchStub = stubFetch(apiSearchEngagement1);
const graphQLServer = createGraphQLServer({ const graphQLServer = createGraphQLServer(noCacheServerConfig);
cacheEnabled: false,
voltastics: voltasticsConfigMock,
imageProxyBaseUrl: serverConfigMock.imageProxyBaseUrl,
port: 0,
cacheTtlMsVoltastics: 0,
fake: false,
});
const result = await queryEngagement(graphQLServer); const result = await queryEngagement(graphQLServer);
...@@ -292,14 +287,7 @@ describe("voltastics", () => { ...@@ -292,14 +287,7 @@ describe("voltastics", () => {
it("correctly parses category list", async () => { it("correctly parses category list", async () => {
fetchStub = stubFetch(apiCategoriesResponse); fetchStub = stubFetch(apiCategoriesResponse);
const graphQLServer = createGraphQLServer({ const graphQLServer = createGraphQLServer(noCacheServerConfig);
cacheEnabled: false,
voltastics: voltasticsConfigMock,
imageProxyBaseUrl: serverConfigMock.imageProxyBaseUrl,
port: 0,
cacheTtlMsVoltastics: 0,
fake: false,
});
const result = await queryCategories(graphQLServer); const result = await queryCategories(graphQLServer);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment