mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix(api): resolve getAllowsOrigins unit tests
This commit is contained in:
parent
36fa34b303
commit
39e587de26
@ -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 () => {
|
||||
|
Loading…
Reference in New Issue
Block a user