test(FN-4298): align worktree test fixtures with default liveness mock

Fusion-Task-Id: FN-4298
Fusion-Task-Lineage: 25d48169-58be-42f9-aafc-4b47db554e57
This commit is contained in:
Fusion
2026-05-13 05:19:00 -07:00
committed by gsxdsm
parent 9a8fba231e
commit e89c15a16b

View File

@@ -29,6 +29,7 @@ import {
mockedExecSync,
mockedExistsSync,
mockedHydrateWorktreeDb,
mockedIsUsableTaskWorktree,
mockExecuteAll,
mockTerminateAllSessions,
mockCleanup,
@@ -403,6 +404,7 @@ describe("TaskExecutor worktree naming", () => {
it("does not reuse a stored worktree path that is not registered", async () => {
const stalePath = "/tmp/test/.worktrees/broken-wt";
mockedIsUsableTaskWorktree.mockResolvedValueOnce(false);
mockedExistsSync.mockImplementation((path) => String(path).startsWith(stalePath));
mockedExecSync.mockImplementation((cmd: any) => {
if (String(cmd) === "git worktree list --porcelain") {
@@ -2203,6 +2205,7 @@ describe("worktree DB hydration", () => {
});
it("runs hydration path when executor reassigns unusable root worktree", async () => {
mockedIsUsableTaskWorktree.mockResolvedValueOnce(false);
mockedExistsSync.mockReturnValue(true);
const store = createMockStore();
const executor = new TaskExecutor(store, "/tmp/test");