mirror of https://github.com/openclaw/openclaw.git
perf(slack): avoid module resets in outbound adapter test
This commit is contained in:
parent
dbe6663c34
commit
3f2fb73cfe
|
|
@ -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 () => {
|
||||
|
|
|
|||
|
|
@ -75,6 +75,9 @@
|
|||
"extensions/slack/src/monitor/slash.test.ts": {
|
||||
"durationMs": 12500
|
||||
},
|
||||
"extensions/slack/src/outbound-adapter.test.ts": {
|
||||
"durationMs": 4630
|
||||
},
|
||||
"extensions/whatsapp/src/send.test.ts": {
|
||||
"durationMs": 2700
|
||||
},
|
||||
|
|
@ -190,7 +193,7 @@
|
|||
"durationMs": 950
|
||||
},
|
||||
"extensions/slack/src/send.upload.test.ts": {
|
||||
"durationMs": 923
|
||||
"durationMs": 10010
|
||||
},
|
||||
"extensions/telegram/src/bot-native-commands.registry.test.ts": {
|
||||
"durationMs": 842
|
||||
|
|
|
|||
Loading…
Reference in New Issue