test: preserve message-channel exports in compaction hooks

This commit is contained in:
Josh Lehman 2026-03-12 16:06:44 -07:00
parent 2d826de3c9
commit ee04354692
No known key found for this signature in database
GPG Key ID: D141B425AC7F876B

View File

@ -377,10 +377,15 @@ export async function loadCompactHooksHarness(): Promise<{
resolveChannelCapabilities: vi.fn(() => undefined),
}));
vi.doMock("../../utils/message-channel.js", () => ({
INTERNAL_MESSAGE_CHANNEL: "webchat",
normalizeMessageChannel: vi.fn(() => undefined),
}));
vi.doMock("../../utils/message-channel.js", async () => {
const actual = await vi.importActual<typeof import("../../utils/message-channel.js")>(
"../../utils/message-channel.js",
);
return {
...actual,
normalizeMessageChannel: vi.fn(() => undefined),
};
});
vi.doMock("../pi-embedded-helpers.js", () => ({
ensureSessionHeader: vi.fn(async () => {}),