fix: add listMissions to MissionStore mock to prevent flaky test
The MissionLoop calls this.missionStore.listMissions() during startup recovery, but the mock TaskStore's getMissionStore() return value didn't include this method. When the runtime startup sequence raced ahead, it would hit "listMissions is not a function" — making the test flaky. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -57,6 +57,7 @@ vi.mock("@fusion/core", async () => {
|
||||
self.getTask = mockTaskStoreGetTask;
|
||||
self.getSettings = vi.fn().mockImplementation(async () => structuredClone(mockTaskStoreSettings));
|
||||
self.getMissionStore = vi.fn().mockReturnValue({
|
||||
listMissions: vi.fn().mockReturnValue([]),
|
||||
getMissionWithHierarchy: vi.fn().mockReturnValue(null),
|
||||
findNextPendingSlice: vi.fn().mockReturnValue(null),
|
||||
activateSlice: vi.fn(),
|
||||
|
||||
Reference in New Issue
Block a user