mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 09:50:42 +00:00
test: keep hook and slack tests on public boundaries
This commit is contained in:
@@ -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";
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
16
test/helpers/plugins/outbound-delivery.ts
Normal file
16
test/helpers/plugins/outbound-delivery.ts
Normal file
@@ -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";
|
||||
Reference in New Issue
Block a user