test(auto-reply): reset inbound dedupe for acp abort

This commit is contained in:
Peter Steinberger
2026-04-25 02:42:34 +01:00
parent 69c258f9dc
commit 1eef6df5f5

View File

@@ -27,6 +27,7 @@ import { buildTestCtx } from "./test-ctx.js";
let dispatchReplyFromConfig: typeof import("./dispatch-from-config.js").dispatchReplyFromConfig;
let tryDispatchAcpReplyHook: typeof import("../../plugin-sdk/acp-runtime.js").tryDispatchAcpReplyHook;
let resetInboundDedupe: typeof import("./inbound-dedupe.js").resetInboundDedupe;
function shouldUseAcpReplyDispatchHook(eventUnknown: unknown): boolean {
const event = eventUnknown as {
@@ -128,10 +129,12 @@ describe("dispatchReplyFromConfig ACP abort", () => {
beforeAll(async () => {
({ dispatchReplyFromConfig } = await import("./dispatch-from-config.js"));
({ tryDispatchAcpReplyHook } = await import("../../plugin-sdk/acp-runtime.js"));
({ resetInboundDedupe } = await import("./inbound-dedupe.js"));
});
beforeEach(() => {
setDiscordTestRegistry();
resetInboundDedupe();
acpManagerRuntimeMocks.getAcpSessionManager.mockReset();
acpManagerRuntimeMocks.getAcpSessionManager.mockReturnValue(createMockAcpSessionManager());
hookMocks.runner.hasHooks.mockReset();