FrontendConfig: Fix unit test

Emulate the behaviour of the new app config: If renderOrigin is undefined instead use domain.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2021-04-27 23:33:13 +02:00
parent 8bf5aa77e3
commit 265f3095e4

View file

@ -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: [],