fix(test): type overflow resolver mock (#91098)

This commit is contained in:
Dallin Romney
2026-06-06 23:40:37 -07:00
committed by GitHub
parent 607bbe4f5c
commit a77d0fdd97
@@ -50,6 +50,20 @@ type MockCompactionResult =
result?: undefined;
};
type MockResolvedModel = {
model: {
id: string;
provider: string;
contextWindow: number;
api: string;
reasoning?: boolean;
};
error: null;
authStorage: Record<string, unknown>;
modelRegistry: Record<string, unknown>;
};
type MockResolveModelAsync = (..._args: unknown[]) => Promise<MockResolvedModel>;
export const mockedGlobalHookRunner = {
hasHooks: vi.fn((_hookName: string) => false),
runBeforeAgentReply: vi.fn(
@@ -102,7 +116,7 @@ export const mockedResolveContextEngineOwnerPluginId = vi.fn(() => undefined);
export const mockedBuildAgentRuntimePlan = vi.fn(() => ({}));
export const mockedRunPostCompactionSideEffects = vi.fn(async () => {});
export const mockedEnsureRuntimePluginsLoaded = vi.fn<(params?: unknown) => void>();
export const mockedResolveModelAsync = vi.fn(async () => ({
export const mockedResolveModelAsync = vi.fn<MockResolveModelAsync>(async () => ({
model: {
id: "test-model",
provider: "anthropic",