feat(FN-987): wire AgentStore to TaskExecutor in dashboard command
- Wire AgentStore into TaskExecutor initialization within dashboard.ts startup - Add AgentStore mock to dashboard command tests for proper test coverage - Update test mocks to reflect new AgentStore dependency injection
This commit is contained in:
@@ -19,6 +19,7 @@ function makeMockStore() {
|
||||
openrouterModelSync: true,
|
||||
}),
|
||||
listTasks: vi.fn().mockResolvedValue([]),
|
||||
getFusionDir: vi.fn().mockReturnValue("/tmp/test/.fusion"),
|
||||
on: vi.fn((event: string, handler: (...args: unknown[]) => void) => {
|
||||
emitter.on(event, handler);
|
||||
}),
|
||||
@@ -38,6 +39,14 @@ vi.mock("@fusion/core", () => ({
|
||||
listSchedules: vi.fn().mockResolvedValue([]),
|
||||
getDueSchedules: vi.fn().mockResolvedValue([]),
|
||||
})),
|
||||
AgentStore: vi.fn().mockImplementation(() => ({
|
||||
init: vi.fn().mockResolvedValue(undefined),
|
||||
createAgent: vi.fn(),
|
||||
updateAgentState: vi.fn(),
|
||||
listAgents: vi.fn().mockResolvedValue([]),
|
||||
getAgent: vi.fn().mockResolvedValue(null),
|
||||
deleteAgent: vi.fn(),
|
||||
})),
|
||||
}));
|
||||
|
||||
// ── Mock @fusion/dashboard ─────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user