fix(api): resolve getAllowsOrigins unit tests

This commit is contained in:
yassinedorbozgithub 2025-04-12 05:00:34 +01:00
parent 36fa34b303
commit 39e587de26

View File

@ -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 () => {