From 0b4bc784968956b6754703d404a6749f62b2d89f Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 1 May 2026 12:45:18 +0100 Subject: [PATCH] refactor: trim cron test helper exports --- src/cron/isolated-agent.turn-test-helpers.ts | 6 +++--- src/cron/service.issue-regressions.test-helpers.ts | 2 +- src/cron/service.test-harness.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cron/isolated-agent.turn-test-helpers.ts b/src/cron/isolated-agent.turn-test-helpers.ts index 8bdb413f2e2..2bd4e43cb18 100644 --- a/src/cron/isolated-agent.turn-test-helpers.ts +++ b/src/cron/isolated-agent.turn-test-helpers.ts @@ -25,7 +25,7 @@ export function makeDeps(): CliDeps { }; } -export function mockEmbeddedPayloads(payloads: Array<{ text?: string; isError?: boolean }>) { +function mockEmbeddedPayloads(payloads: Array<{ text?: string; isError?: boolean }>) { vi.mocked(runEmbeddedPiAgent).mockResolvedValue({ payloads, meta: { @@ -35,7 +35,7 @@ export function mockEmbeddedPayloads(payloads: Array<{ text?: string; isError?: }); } -export function mockEmbeddedTexts(texts: string[]) { +function mockEmbeddedTexts(texts: string[]) { mockEmbeddedPayloads(texts.map((text) => ({ text }))); } @@ -68,7 +68,7 @@ export async function readSessionEntry(storePath: string, key: string) { } export const DEFAULT_MESSAGE = "do it"; -export const DEFAULT_SESSION_KEY = "cron:job-1"; +const DEFAULT_SESSION_KEY = "cron:job-1"; export const DEFAULT_AGENT_TURN_PAYLOAD: CronJob["payload"] = { kind: "agentTurn", message: DEFAULT_MESSAGE, diff --git a/src/cron/service.issue-regressions.test-helpers.ts b/src/cron/service.issue-regressions.test-helpers.ts index 45b040828a3..7c2ca29d1be 100644 --- a/src/cron/service.issue-regressions.test-helpers.ts +++ b/src/cron/service.issue-regressions.test-helpers.ts @@ -14,7 +14,7 @@ import { } from "../../test/helpers/cron/service-regression-fixtures.js"; import { CronService } from "./service.js"; -export type CronServiceOptions = ConstructorParameters[0]; +type CronServiceOptions = ConstructorParameters[0]; export const setupCronIssueRegressionFixtures = () => setupCronRegressionFixtures({ prefix: "cron-issues-" }); diff --git a/src/cron/service.test-harness.ts b/src/cron/service.test-harness.ts index 5a231930bcf..8888f0d2ab9 100644 --- a/src/cron/service.test-harness.ts +++ b/src/cron/service.test-harness.ts @@ -8,7 +8,7 @@ import { CronService } from "./service.js"; import { createCronServiceState, type CronServiceState } from "./service/state.js"; import type { CronJob } from "./types.js"; -export type NoopLogger = { +type NoopLogger = { debug: MockFn; info: MockFn; warn: MockFn; @@ -204,7 +204,7 @@ export function createRunningCronServiceState(params: { return state; } -export function disposeCronServiceState(state: { timer: NodeJS.Timeout | null }): void { +function disposeCronServiceState(state: { timer: NodeJS.Timeout | null }): void { if (state.timer) { clearTimeout(state.timer); state.timer = null;