test: tighten channel empty array assertions

This commit is contained in:
Shakker
2026-05-09 04:38:47 +01:00
parent 1d7fbc94c6
commit 3d1e349e7f
7 changed files with 10 additions and 10 deletions

View File

@@ -66,7 +66,7 @@ describe("resolveGroupAllowFromSources", () => {
groupAllowFrom: [],
fallbackToAllowFrom: false,
}),
).toEqual([]);
).toStrictEqual([]);
});
});

View File

@@ -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([]);
});
});

View File

@@ -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", () => {

View File

@@ -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([]);
});
});

View File

@@ -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 () => {

View File

@@ -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 () => {

View File

@@ -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", () => {