chore: enable no-base-to-string

This commit is contained in:
Peter Steinberger
2026-04-10 20:08:00 +01:00
parent dfe4c2d16d
commit 2786ed0f67
22 changed files with 92 additions and 35 deletions

View File

@@ -364,7 +364,10 @@ describe("broadcast dispatch", () => {
});
expect(mockDispatchReplyFromConfig).toHaveBeenCalledTimes(1);
const sessionKey = String(finalizeInboundContextCalls[0]?.SessionKey ?? "");
const sessionKey =
typeof finalizeInboundContextCalls[0]?.SessionKey === "string"
? finalizeInboundContextCalls[0].SessionKey
: "";
expect(sessionKey).toBe("agent:susan:feishu:group:oc-broadcast-group");
});
});

View File

@@ -539,7 +539,7 @@ describe("createFeishuReplyDispatcher streaming behavior", () => {
expect(streamingInstances).toHaveLength(1);
const updateCalls = streamingInstances[0].update.mock.calls.map((c: unknown[]) =>
String(c[0] ?? ""),
typeof c[0] === "string" ? c[0] : "",
);
const reasoningUpdate = updateCalls.find((c) => c.includes("Thinking"));
expect(reasoningUpdate).toContain("> 💭 **Thinking**");

View File

@@ -180,7 +180,7 @@ describe("feishu tool account routing", () => {
const result = await tool.execute("call", { action: "search" });
expect(createFeishuClientMock).not.toHaveBeenCalled();
expect(String(result.details.error ?? "")).toContain(
expect(typeof result.details.error === "string" ? result.details.error : "").toContain(
"Resolve this command against an active gateway runtime snapshot before reading it.",
);
});