backend-test-utils: review fixes

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2026-02-10 10:51:14 +01:00
parent 42abfb1b85
commit 1cedbc7d1b
10 changed files with 12 additions and 43 deletions
+7 -6
View File
@@ -47,12 +47,13 @@ describe('gateway', () => {
},
});
const discovery = mockServices.discovery.mock();
discovery.getBaseUrl.mockImplementation(async (pluginId: string) => {
if (pluginId === 'external-plugin') {
return 'http://localhost:7778/api/external-plugin';
}
return `http://localhost:7777/api/${pluginId}`;
const discovery = mockServices.discovery.mock({
async getBaseUrl(pluginId) {
if (pluginId === 'external-plugin') {
return 'http://localhost:7778/api/external-plugin';
}
return `http://localhost:7777/api/${pluginId}`;
},
});
beforeAll(async () => {