fix: add requestHeartbeatNow runtime coverage (#19464) (thanks @AustinEral)

This commit is contained in:
Peter Steinberger
2026-03-03 01:40:11 +00:00
parent 3b9877dee7
commit ebbb572639
2 changed files with 7 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
import { beforeEach, describe, expect, it, vi } from "vitest";
import { onAgentEvent } from "../../infra/agent-events.js";
import { requestHeartbeatNow } from "../../infra/heartbeat-wake.js";
import { onSessionTranscriptUpdate } from "../../sessions/transcript-events.js";
const runCommandWithTimeoutMock = vi.hoisted(() => vi.fn());
@@ -47,4 +48,9 @@ describe("plugin runtime command execution", () => {
expect(runtime.events.onAgentEvent).toBe(onAgentEvent);
expect(runtime.events.onSessionTranscriptUpdate).toBe(onSessionTranscriptUpdate);
});
it("exposes runtime.system.requestHeartbeatNow", () => {
const runtime = createPluginRuntime();
expect(runtime.system.requestHeartbeatNow).toBe(requestHeartbeatNow);
});
});