mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-18 18:04:45 +00:00
test: check twitch client log messages
This commit is contained in:
@@ -138,9 +138,7 @@ describe("TwitchClientManager", () => {
|
||||
|
||||
// New implementation: connect is called, channels are passed to constructor
|
||||
expect(mockConnect).toHaveBeenCalledTimes(1);
|
||||
expect(mockLogger.info).toHaveBeenCalledWith(
|
||||
expect.stringContaining("Connected to Twitch as testbot"),
|
||||
);
|
||||
expect(mockLogger.info).toHaveBeenCalledWith("Connected to Twitch as testbot");
|
||||
});
|
||||
|
||||
it("should use account username as default channel when channel not specified", async () => {
|
||||
@@ -213,9 +211,7 @@ describe("TwitchClientManager", () => {
|
||||
"Missing Twitch client ID",
|
||||
);
|
||||
|
||||
expect(mockLogger.error).toHaveBeenCalledWith(
|
||||
expect.stringContaining("Missing Twitch client ID"),
|
||||
);
|
||||
expect(mockLogger.error).toHaveBeenCalledWith("Missing Twitch client ID for account testbot");
|
||||
});
|
||||
|
||||
it("should throw error when token is missing", async () => {
|
||||
@@ -372,9 +368,7 @@ describe("TwitchClientManager", () => {
|
||||
|
||||
expect(result.ok).toBe(false);
|
||||
expect(result.error).toBe("Rate limited");
|
||||
expect(mockLogger.error).toHaveBeenCalledWith(
|
||||
expect.stringContaining("Failed to send message"),
|
||||
);
|
||||
expect(mockLogger.error).toHaveBeenCalledWith("Failed to send message: Rate limited");
|
||||
});
|
||||
|
||||
it("should handle unknown error types", async () => {
|
||||
|
||||
Reference in New Issue
Block a user