chore(lint): no-explicit-any in worktree-session.test

This commit is contained in:
Mohamed Boudra
2026-04-24 06:03:44 +07:00
parent a13a6012e1
commit 4ea51c3ad5
@@ -40,6 +40,7 @@ import {
} from "./paseo-worktree-service.js";
import { createWorktreeCoreDeps } from "./worktree-core.js";
import { WorkspaceGitServiceImpl } from "./workspace-git-service.js";
import type { WorkspaceGitService } from "./workspace-git-service.js";
interface LegacyCreateWorktreeTestOptions {
branchName: string;
@@ -293,7 +294,7 @@ describe("handlePaseoWorktreeListRequest", () => {
{
emit: (message) => emitted.push(message),
paseoHome: "/tmp/paseo-home",
workspaceGitService: workspaceGitService as any,
workspaceGitService: workspaceGitService as unknown as WorkspaceGitService,
},
{
type: "paseo_worktree_list_request",
@@ -334,9 +335,9 @@ describe("resolveGitCreateBaseBranch", () => {
};
try {
await expect(resolveGitCreateBaseBranch(cwd, workspaceGitService as any)).resolves.toBe(
"main",
);
await expect(
resolveGitCreateBaseBranch(cwd, workspaceGitService as unknown as WorkspaceGitService),
).resolves.toBe("main");
expect(workspaceGitService.resolveDefaultBranch).toHaveBeenCalledWith(cwd);
expect(workspaceGitService.getSnapshot).not.toHaveBeenCalled();
@@ -1153,7 +1154,7 @@ describe("handleCreatePaseoWorktreeRequest", () => {
workspaceGitService: {
resolveRepoRoot: vi.fn(async () => repoDir),
resolveDefaultBranch: vi.fn(async () => "main"),
} as any,
} as unknown as WorkspaceGitService,
createPaseoWorktree: createPaseoWorktreeForTest({ paseoHome }),
checkoutExistingBranch: async () => {
throw new Error("should not checkout existing branch");
@@ -1636,7 +1637,7 @@ describe("archivePaseoWorktree", () => {
{
paseoHome,
github: createGitHubServiceStub(),
workspaceGitService: workspaceGitService as any,
workspaceGitService: workspaceGitService as unknown as WorkspaceGitService,
agentManager: {
listAgents: () => [],
closeAgent: vi.fn(async () => {}),