mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-28 04:02:18 +01:00
test(server): isolate question delivery imports
This commit is contained in:
1 parent
4da84bb48a
commit
624538ac54
5 files changed
+17
-3
No files matched your search
@@ -149,6 +149,9 @@ vi.mock("../services/trust-preset-resolver.js", () => ({
|
||||
}));
|
||||
|
||||
function registerModuleMocks() {
|
||||
vi.doMock("../services/question-response-delivery.js", () => ({
|
||||
questionResponseDeliveryService: () => mockQuestionResponseDeliveries,
|
||||
}));
|
||||
vi.doMock("../services/index.js", () => ({
|
||||
companyService: () => ({
|
||||
getById: vi.fn(async () => ({ id: "company-1", attachmentMaxBytes: 10 * 1024 * 1024 })),
|
||||
@@ -210,7 +213,6 @@ function registerModuleMocks() {
|
||||
}),
|
||||
issueService: () => mockIssueService,
|
||||
issueThreadInteractionService: () => mockInteractionService,
|
||||
questionResponseDeliveryService: () => mockQuestionResponseDeliveries,
|
||||
taskWatchdogService: () => ({
|
||||
getActiveForIssue: vi.fn(async () => null),
|
||||
upsertForIssue: vi.fn(),
|
||||
|
||||
@@ -314,6 +314,18 @@ vi.mock("../services/index.js", () => ({
|
||||
})),
|
||||
}));
|
||||
|
||||
vi.mock("../services/question-response-delivery.js", () => ({
|
||||
questionResponseDeliveryService: vi.fn(() => ({
|
||||
sweepPending: vi.fn(async () => ({
|
||||
scanned: 0,
|
||||
steered: 0,
|
||||
coalesced: 0,
|
||||
wakeFallback: 0,
|
||||
failed: 0,
|
||||
})),
|
||||
})),
|
||||
}));
|
||||
|
||||
vi.mock("../services/secret-proposals.js", () => ({
|
||||
createSecretProposalsService: vi.fn(() => ({
|
||||
sweepExpired: vi.fn(async () => 0),
|
||||
|
||||
+1
-1
@@ -59,7 +59,6 @@ import {
|
||||
issueThreadInteractionService,
|
||||
issueService,
|
||||
instanceSettingsService,
|
||||
questionResponseDeliveryService,
|
||||
reconcileBuiltInAgentsOnStartup,
|
||||
reconcileCodexLocalManagedHomesOnStartup,
|
||||
reconcilePersistedRuntimeServicesOnStartup,
|
||||
@@ -68,6 +67,7 @@ import {
|
||||
toolAccessService,
|
||||
workspaceOperationService,
|
||||
} from "./services/index.js";
|
||||
import { questionResponseDeliveryService } from "./services/question-response-delivery.js";
|
||||
import { queueIssueAssignmentWakeup } from "./services/issue-assignment-wakeup.js";
|
||||
import { createSecretProposalsService } from "./services/secret-proposals.js";
|
||||
import { environmentRuntimeService } from "./services/environment-runtime.js";
|
||||
|
||||
@@ -144,6 +144,7 @@ import {
|
||||
routineService,
|
||||
workProductService,
|
||||
} from "../services/index.js";
|
||||
import { questionResponseDeliveryService } from "../services/question-response-delivery.js";
|
||||
import { artifactReviewDocumentService } from "../services/artifact-review-documents.js";
|
||||
import { assertCanResolveProposal } from "../services/secret-proposal-authorization.js";
|
||||
import { buildDocumentReviewContext, buildPlanReviewContext } from "../services/plan-review-context.js";
|
||||
|
||||
@@ -42,7 +42,6 @@ export {
|
||||
type IssueFilters,
|
||||
} from "./issues.js";
|
||||
export { issueThreadInteractionService } from "./issue-thread-interactions.js";
|
||||
export { questionResponseDeliveryService } from "./question-response-delivery.js";
|
||||
export {
|
||||
assertIssueReviewVerdictActorAllowed,
|
||||
type IssueReviewVerdictActor,
|
||||
|
||||
Reference in new issue
Block a user