diff --git a/server/src/dtos/config.dto.spec.ts b/server/src/dtos/config.dto.spec.ts index 8eca6053e..8b2cf4a7a 100644 --- a/server/src/dtos/config.dto.spec.ts +++ b/server/src/dtos/config.dto.spec.ts @@ -44,7 +44,7 @@ describe('config visibility', () => { ...defaults, oauth: { ...defaults.oauth, accountManagementUrl: 'https://accounts.example.com', clientSecret: 'private' }, }; - expect(mapUserConfig(config).oauth.accountManagementUrl).toBe('https://accounts.example.com'); + expect(mapUserConfig(config).oauth?.accountManagementUrl).toBe('https://accounts.example.com'); expect(mapUserConfig(config).oauth).not.toHaveProperty('clientSecret'); expect(mapPublicConfig(config).oauth).not.toHaveProperty('accountManagementUrl'); expect(mapPublicConfig(config).oauth).not.toHaveProperty('clientSecret');