diff --git a/test/helpers/channels/outbound-payload-contract.ts b/test/helpers/channels/outbound-payload-contract.ts index db0d6ac2bc5..1fe2c064673 100644 --- a/test/helpers/channels/outbound-payload-contract.ts +++ b/test/helpers/channels/outbound-payload-contract.ts @@ -1,4 +1,4 @@ -import { expect, it, type Mock, vi } from "vitest"; +import { beforeEach, expect, it, type Mock, vi } from "vitest"; import { createSlackOutboundPayloadHarness } from "../../../extensions/slack/contract-api.js"; import { whatsappOutbound } from "../../../extensions/whatsapp/test-api.js"; import { @@ -10,6 +10,7 @@ import type { ReplyPayload } from "../../../src/auto-reply/types.js"; import { primeChannelOutboundSendMock } from "../../../src/channels/plugins/contracts/test-helpers.js"; import { createDirectTextMediaOutbound } from "../../../src/channels/plugins/outbound/direct-text-media.js"; import type { ChannelOutboundAdapter } from "../../../src/channels/plugins/types.js"; +import { resetGlobalHookRunner } from "../../../src/plugins/hook-runner-global.js"; import { loadBundledPluginTestApiSync } from "../../../src/test-utils/bundled-plugin-public-surface.js"; type ParseZalouserOutboundTarget = (raw: string) => { threadId: string; isGroup: boolean }; @@ -71,6 +72,10 @@ function installChannelOutboundPayloadContractSuite(params: { to: string; }; }) { + beforeEach(() => { + resetGlobalHookRunner(); + }); + it("text-only delegates to sendText", async () => { const { run, sendMock, to } = params.createHarness({ payload: { text: "hello" },