feat(FN-4298): complete Step 1 — add default worktree liveness helper mock
Fusion-Task-Id: FN-4298 Fusion-Task-Lineage: 25d48169-58be-42f9-aafc-4b47db554e57
This commit is contained in:
@@ -106,6 +106,13 @@ vi.mock("../worktree-names.js", async () => {
|
||||
generateWorktreeName: vi.fn().mockReturnValue("swift-falcon"),
|
||||
};
|
||||
});
|
||||
vi.mock("../worktree-pool.js", async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import("../worktree-pool.js")>();
|
||||
return {
|
||||
...actual,
|
||||
isUsableTaskWorktree: vi.fn().mockResolvedValue(true),
|
||||
};
|
||||
});
|
||||
|
||||
vi.mock("node:child_process", async () => {
|
||||
const { promisify } = await import("node:util");
|
||||
@@ -230,6 +237,7 @@ import { withRateLimitRetry } from "../rate-limit-retry.js";
|
||||
import { execSync } from "node:child_process";
|
||||
import { existsSync, realpathSync } from "node:fs";
|
||||
import { hydrateWorktreeDb } from "../worktree-db-hydrate.js";
|
||||
import { isUsableTaskWorktree } from "../worktree-pool.js";
|
||||
|
||||
export const mockedCreateFnAgent = vi.mocked(createFnAgent);
|
||||
export const mockedSessionManager = vi.mocked(SessionManager);
|
||||
@@ -241,6 +249,7 @@ export const mockedExecSync = vi.mocked(execSync);
|
||||
export const mockedExistsSync = vi.mocked(existsSync);
|
||||
export const mockedRealpathSync = vi.mocked(realpathSync);
|
||||
export const mockedHydrateWorktreeDb = vi.mocked(hydrateWorktreeDb);
|
||||
export const mockedIsUsableTaskWorktree = vi.mocked(isUsableTaskWorktree);
|
||||
|
||||
export type EventListener = (...args: unknown[]) => void;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user