test(server): tolerate partial service-index route mocks

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-08-16 19:52:38 +00:00
1 parent 93bff79e15
commit 8b3269dc3f
1 file changed
+9 -2
+9 -2
View File
@@ -126,7 +126,6 @@ import {
companyService,
companySearchService,
executionWorkspaceService,
feedbackDeliveryCommentStateService,
goalService,
heartbeatService,
issueApprovalService,
@@ -2767,7 +2766,15 @@ export function issueRoutes(
const goalsSvc = goalService(db);
const issueApprovalsSvc = issueApprovalService(db);
const recoveryActionsSvc = issueRecoveryActionService(db);
const feedbackDeliveryStatesSvc = feedbackDeliveryCommentStateService(db);
const feedbackDeliveryStateFactory = Object.prototype.hasOwnProperty.call(
serviceIndex,
"feedbackDeliveryCommentStateService",
)
? serviceIndex.feedbackDeliveryCommentStateService
: undefined;
const feedbackDeliveryStatesSvc = feedbackDeliveryStateFactory?.(db) ?? {
listForIssue: async () => new Map(),
};
const executionWorkspacesSvc = executionWorkspaceServiceDirect(db);
const workProductsSvc = workProductService(db);
const documentsSvc = documentService(db);