mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-22 16:38:12 +00:00
test(feishu): reset lifecycle monitor state
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
// Feishu plugin module implements lifecycle support behavior.
|
||||
import { vi, type Mock } from "vitest";
|
||||
import { testingHooks as dedupTestingHooks } from "./dedup.js";
|
||||
import { testingHooks as processingClaimTestingHooks } from "./processing-claims.js";
|
||||
|
||||
type BoundConversation = {
|
||||
bindingId: string;
|
||||
@@ -89,6 +91,8 @@ export function getFeishuLifecycleTestMocks(): FeishuLifecycleTestMocks {
|
||||
}
|
||||
|
||||
export function resetFeishuLifecycleTestMocks(): void {
|
||||
dedupTestingHooks.resetFeishuDedupForTests();
|
||||
processingClaimTestingHooks.resetFeishuMessageProcessingClaimsForTests();
|
||||
for (const mock of Object.values(feishuLifecycleTestMocks)) {
|
||||
mock.mockReset();
|
||||
}
|
||||
|
||||
@@ -58,3 +58,9 @@ export function releaseFeishuMessageProcessing(
|
||||
processingClaims.delete(key);
|
||||
}
|
||||
}
|
||||
|
||||
export const testingHooks = {
|
||||
resetFeishuMessageProcessingClaimsForTests() {
|
||||
processingClaims.clear();
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user