From 265f3095e415a6c336e9a57a618aa8b689d80ef2 Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Tue, 27 Apr 2021 23:33:13 +0200 Subject: [PATCH] FrontendConfig: Fix unit test Emulate the behaviour of the new app config: If renderOrigin is undefined instead use domain. Signed-off-by: Philip Molares --- src/frontend-config/frontend-config.service.spec.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/frontend-config/frontend-config.service.spec.ts b/src/frontend-config/frontend-config.service.spec.ts index d2e90a7e0..34fa83993 100644 --- a/src/frontend-config/frontend-config.service.spec.ts +++ b/src/frontend-config/frontend-config.service.spec.ts @@ -21,6 +21,7 @@ import { Loglevel } from '../config/loglevel.enum'; */ describe('FrontendConfigService', () => { + const domain = 'http://md.example.com'; const emptyAuthConfig: AuthConfig = { email: { enableLogin: false, @@ -183,8 +184,8 @@ describe('FrontendConfigService', () => { ]) { it(`combination #${index} works`, async () => { const appConfig: AppConfig = { - domain: 'http://md.example.com', - rendererOrigin: renderOrigin, + domain: domain, + rendererOrigin: renderOrigin ?? domain, port: 3000, loglevel: Loglevel.ERROR, forbiddenNoteIds: [],