mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 23:56:07 +00:00
test: pin Zalo lifecycle logs
This commit is contained in:
@@ -91,9 +91,7 @@ describe("monitorZaloProvider lifecycle", () => {
|
||||
await monitoredRun;
|
||||
|
||||
expect(settled).toBe(true);
|
||||
expect(runtime.log).toHaveBeenCalledWith(
|
||||
expect.stringContaining("Zalo provider stopped mode=polling"),
|
||||
);
|
||||
expect(runtime.log).toHaveBeenCalledWith("[default] Zalo provider stopped mode=polling");
|
||||
});
|
||||
|
||||
it("deletes an existing webhook before polling", async () => {
|
||||
@@ -110,7 +108,7 @@ describe("monitorZaloProvider lifecycle", () => {
|
||||
expect(getWebhookInfoMock).toHaveBeenCalledTimes(1);
|
||||
expect(deleteWebhookMock).toHaveBeenCalledTimes(1);
|
||||
expect(runtime.log).toHaveBeenCalledWith(
|
||||
expect.stringContaining("Zalo polling mode ready (webhook disabled)"),
|
||||
"[default] Zalo polling mode ready (webhook disabled)",
|
||||
);
|
||||
|
||||
abort.abort();
|
||||
@@ -129,7 +127,7 @@ describe("monitorZaloProvider lifecycle", () => {
|
||||
expect(getWebhookInfoMock).toHaveBeenCalledTimes(1);
|
||||
expect(deleteWebhookMock).not.toHaveBeenCalled();
|
||||
expect(runtime.log).toHaveBeenCalledWith(
|
||||
expect.stringContaining("webhook inspection unavailable; continuing without webhook cleanup"),
|
||||
"[default] Zalo polling mode webhook inspection unavailable; continuing without webhook cleanup",
|
||||
);
|
||||
expect(runtime.error).not.toHaveBeenCalled();
|
||||
|
||||
@@ -191,8 +189,6 @@ describe("monitorZaloProvider lifecycle", () => {
|
||||
|
||||
expect(settled).toBe(true);
|
||||
expect(registry.httpRoutes).toHaveLength(0);
|
||||
expect(runtime.log).toHaveBeenCalledWith(
|
||||
expect.stringContaining("Zalo provider stopped mode=webhook"),
|
||||
);
|
||||
expect(runtime.log).toHaveBeenCalledWith("[default] Zalo provider stopped mode=webhook");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user