mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-28 01:21:36 +00:00
perf(slack): avoid module resets in outbound adapter test
This commit is contained in:
@@ -16,6 +16,7 @@ vi.mock("openclaw/plugin-sdk/plugin-runtime", () => ({
|
||||
}));
|
||||
|
||||
let slackOutbound: typeof import("./outbound-adapter.js").slackOutbound;
|
||||
({ slackOutbound } = await import("./outbound-adapter.js"));
|
||||
|
||||
describe("slackOutbound", () => {
|
||||
const cfg = {
|
||||
@@ -27,13 +28,11 @@ describe("slackOutbound", () => {
|
||||
},
|
||||
};
|
||||
|
||||
beforeEach(async () => {
|
||||
vi.resetModules();
|
||||
beforeEach(() => {
|
||||
sendMessageSlackMock.mockReset();
|
||||
hasHooksMock.mockReset();
|
||||
runMessageSendingMock.mockReset();
|
||||
hasHooksMock.mockReturnValue(false);
|
||||
({ slackOutbound } = await import("./outbound-adapter.js"));
|
||||
});
|
||||
|
||||
it("sends payload media first, then finalizes with blocks", async () => {
|
||||
|
||||
Reference in New Issue
Block a user