diff --git a/extensions/slack/src/outbound-delivery.test.ts b/extensions/slack/src/outbound-delivery.test.ts index 485db825937..5c2d4f4f167 100644 --- a/extensions/slack/src/outbound-delivery.test.ts +++ b/extensions/slack/src/outbound-delivery.test.ts @@ -1,20 +1,16 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; -import { deliverOutboundPayloads } from "../../../src/infra/outbound/deliver.js"; -import { - initializeGlobalHookRunner, - resetGlobalHookRunner, -} from "../../../src/plugins/hook-runner-global.js"; -import { addTestHook } from "../../../src/plugins/hooks.test-helpers.js"; -import { createEmptyPluginRegistry } from "../../../src/plugins/registry.js"; -import { - releasePinnedPluginChannelRegistry, - setActivePluginRegistry, -} from "../../../src/plugins/runtime.js"; -import type { PluginHookRegistration } from "../../../src/plugins/types.js"; import { + addTestHook, + createEmptyPluginRegistry, createOutboundTestPlugin, createTestRegistry, -} from "../../../src/test-utils/channel-plugins.js"; + deliverOutboundPayloads, + initializeGlobalHookRunner, + releasePinnedPluginChannelRegistry, + resetGlobalHookRunner, + setActivePluginRegistry, + type PluginHookRegistration, +} from "../../../test/helpers/plugins/outbound-delivery.js"; import { slackOutbound } from "./outbound-adapter.js"; import type { OpenClawConfig } from "./runtime-api.js"; diff --git a/src/hooks/message-hook-mappers.test.ts b/src/hooks/message-hook-mappers.test.ts index 07fed8bf265..c4cb5491348 100644 --- a/src/hooks/message-hook-mappers.test.ts +++ b/src/hooks/message-hook-mappers.test.ts @@ -143,6 +143,7 @@ describe("message hook mappers", () => { from: "demo-chat:user:123", content: "commands-body", timestamp: 1710000000, + threadId: 42, metadata: expect.objectContaining({ messageId: "msg-1", senderName: "User One", diff --git a/test/helpers/plugins/outbound-delivery.ts b/test/helpers/plugins/outbound-delivery.ts new file mode 100644 index 00000000000..e93562fba97 --- /dev/null +++ b/test/helpers/plugins/outbound-delivery.ts @@ -0,0 +1,16 @@ +export { deliverOutboundPayloads } from "../../../src/infra/outbound/deliver.js"; +export { + initializeGlobalHookRunner, + resetGlobalHookRunner, +} from "../../../src/plugins/hook-runner-global.js"; +export { addTestHook } from "../../../src/plugins/hooks.test-helpers.js"; +export { createEmptyPluginRegistry } from "../../../src/plugins/registry.js"; +export { + releasePinnedPluginChannelRegistry, + setActivePluginRegistry, +} from "../../../src/plugins/runtime.js"; +export type { PluginHookRegistration } from "../../../src/plugins/types.js"; +export { + createOutboundTestPlugin, + createTestRegistry, +} from "../../../src/test-utils/channel-plugins.js";