mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 00:20:42 +00:00
test: tighten channel empty array assertions
This commit is contained in:
@@ -66,7 +66,7 @@ describe("resolveGroupAllowFromSources", () => {
|
||||
groupAllowFrom: [],
|
||||
fallbackToAllowFrom: false,
|
||||
}),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -23,6 +23,6 @@ describe("listBundledChannelCatalogEntries discovery failures", () => {
|
||||
"./bundled-channel-catalog-read.js?scope=discovery-fail-soft",
|
||||
);
|
||||
|
||||
expect(catalog.listBundledChannelCatalogEntries()).toEqual([]);
|
||||
expect(catalog.listBundledChannelCatalogEntries()).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -138,7 +138,7 @@ describe("resolveChannelMatchConfig", () => {
|
||||
describe("validateSenderIdentity", () => {
|
||||
it("allows direct messages without sender fields", () => {
|
||||
const ctx: MsgContext = { ChatType: "direct" };
|
||||
expect(validateSenderIdentity(ctx)).toEqual([]);
|
||||
expect(validateSenderIdentity(ctx)).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("requires some sender identity for non-direct chats", () => {
|
||||
|
||||
@@ -122,7 +122,7 @@ describe("resolveInboundMentionDecision", () => {
|
||||
},
|
||||
});
|
||||
expect(res.implicitMention).toBe(false);
|
||||
expect(res.matchedImplicitMentionKinds).toEqual([]);
|
||||
expect(res.matchedImplicitMentionKinds).toStrictEqual([]);
|
||||
expect(res.effectiveWasMentioned).toBe(false);
|
||||
expect(res.shouldSkip).toBe(true);
|
||||
});
|
||||
@@ -263,6 +263,6 @@ describe("implicitMentionKindWhen", () => {
|
||||
});
|
||||
|
||||
it("returns an empty list when disabled", () => {
|
||||
expect(implicitMentionKindWhen("reply_to_bot", false)).toEqual([]);
|
||||
expect(implicitMentionKindWhen("reply_to_bot", false)).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -546,7 +546,7 @@ describe("channel turn kernel", () => {
|
||||
},
|
||||
});
|
||||
|
||||
expect(historyMap.get("room-1")).toEqual([]);
|
||||
expect(historyMap.get("room-1")).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("cleans up pre-created dispatchers when session recording fails", async () => {
|
||||
|
||||
@@ -73,7 +73,7 @@ describe("realtime voice agent consult runtime", () => {
|
||||
expect(resolveRealtimeVoiceAgentConsultTools("safe-read-only")).toEqual([
|
||||
expect.objectContaining({ name: REALTIME_VOICE_AGENT_CONSULT_TOOL_NAME }),
|
||||
]);
|
||||
expect(resolveRealtimeVoiceAgentConsultTools("none")).toEqual([]);
|
||||
expect(resolveRealtimeVoiceAgentConsultTools("none")).toStrictEqual([]);
|
||||
expect(resolveRealtimeVoiceAgentConsultToolsAllow("safe-read-only")).toEqual([
|
||||
"read",
|
||||
"web_search",
|
||||
@@ -83,7 +83,7 @@ describe("realtime voice agent consult runtime", () => {
|
||||
"memory_get",
|
||||
]);
|
||||
expect(resolveRealtimeVoiceAgentConsultToolsAllow("owner")).toBeUndefined();
|
||||
expect(resolveRealtimeVoiceAgentConsultToolsAllow("none")).toEqual([]);
|
||||
expect(resolveRealtimeVoiceAgentConsultToolsAllow("none")).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("runs an embedded agent using the shared session and prompt contract", async () => {
|
||||
|
||||
@@ -79,7 +79,7 @@ describe("realtime voice agent consult tool", () => {
|
||||
expect(resolveRealtimeVoiceAgentConsultTools("safe-read-only")).toEqual([
|
||||
expect.objectContaining({ name: REALTIME_VOICE_AGENT_CONSULT_TOOL_NAME }),
|
||||
]);
|
||||
expect(resolveRealtimeVoiceAgentConsultTools("none")).toEqual([]);
|
||||
expect(resolveRealtimeVoiceAgentConsultTools("none")).toStrictEqual([]);
|
||||
expect(resolveRealtimeVoiceAgentConsultToolsAllow("safe-read-only")).toEqual([
|
||||
"read",
|
||||
"web_search",
|
||||
@@ -89,7 +89,7 @@ describe("realtime voice agent consult tool", () => {
|
||||
"memory_get",
|
||||
]);
|
||||
expect(resolveRealtimeVoiceAgentConsultToolsAllow("owner")).toBeUndefined();
|
||||
expect(resolveRealtimeVoiceAgentConsultToolsAllow("none")).toEqual([]);
|
||||
expect(resolveRealtimeVoiceAgentConsultToolsAllow("none")).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("keeps the shared consult tool ahead of custom realtime tools and dedupes by name", () => {
|
||||
|
||||
Reference in New Issue
Block a user