test: stabilize vitest mocks and harness typing

This commit is contained in:
Peter Steinberger
2026-02-14 20:44:46 +01:00
parent e4d63818f5
commit 5b7a33272a
14 changed files with 80 additions and 39 deletions

View File

@@ -1,4 +1,4 @@
import { beforeEach, vi } from "vitest";
import { beforeEach, type MockInstance, vi } from "vitest";
import type { SessionEntry } from "../../config/sessions.js";
import type { TypingMode } from "../../config/types.js";
import type { TemplateContext } from "../templating.js";
@@ -10,7 +10,7 @@ const state = vi.hoisted(() => ({
runEmbeddedPiAgentMock: vi.fn(),
}));
export function getRunEmbeddedPiAgentMock() {
export function getRunEmbeddedPiAgentMock(): MockInstance {
return state.runEmbeddedPiAgentMock;
}