From 39e587de2683d20bba72a15faffeb13b2c14b0f6 Mon Sep 17 00:00:00 2001 From: yassinedorbozgithub Date: Sat, 12 Apr 2025 05:00:34 +0100 Subject: [PATCH] fix(api): resolve getAllowsOrigins unit tests --- api/src/setting/services/setting.service.spec.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/api/src/setting/services/setting.service.spec.ts b/api/src/setting/services/setting.service.spec.ts index 17e8d274..8bc5b4cf 100644 --- a/api/src/setting/services/setting.service.spec.ts +++ b/api/src/setting/services/setting.service.spec.ts @@ -161,14 +161,12 @@ describe('SettingService', () => { expect(settingService.find).toHaveBeenCalledWith({ label: 'allowed_domains', }); - expect(result).toEqual( - new Set([ - '*', - 'https://example.com', - 'https://test.com', - 'https://another.com', - ]), - ); + expect(result).toEqual([ + '*', + 'https://example.com', + 'https://test.com', + 'https://another.com', + ]); }); it('should return the config allowed cors only if no settings are found', async () => { @@ -179,7 +177,7 @@ describe('SettingService', () => { expect(settingService.find).toHaveBeenCalledWith({ label: 'allowed_domains', }); - expect(result).toEqual(new Set(['*'])); + expect(result).toEqual(['*']); }); it('should handle settings with empty values', async () => {