test: pin Zalo lifecycle logs

This commit is contained in:
Shakker
2026-05-11 15:04:26 +01:00
parent 02eff52f16
commit 8ee4290e06

View File

@@ -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");
});
});