test: count channel login calls · openclaw/openclaw@366b5cf
shakkernerd
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -308,7 +308,7 @@ describe("channel-auth", () => {
|
308 | 308 | await runChannelLogin({}, runtime); |
309 | 309 | |
310 | 310 | expect(mocks.normalizeChannelId).toHaveBeenCalledWith("whatsapp"); |
311 | | -expect(mocks.login).toHaveBeenCalled(); |
| 311 | +expect(mocks.login).toHaveBeenCalledTimes(1); |
312 | 312 | }); |
313 | 313 | |
314 | 314 | it("propagates auth-channel ambiguity when multiple configured channels support login", async () => { |
@@ -353,7 +353,7 @@ describe("channel-auth", () => {
|
353 | 353 | await runChannelLogin({}, runtime); |
354 | 354 | |
355 | 355 | expect(mocks.normalizeChannelId).toHaveBeenCalledWith("whatsapp"); |
356 | | -expect(mocks.login).toHaveBeenCalled(); |
| 356 | +expect(mocks.login).toHaveBeenCalledTimes(1); |
357 | 357 | }); |
358 | 358 | |
359 | 359 | it("throws for unsupported channel aliases", async () => { |
@@ -426,7 +426,7 @@ describe("channel-auth", () => {
|
426 | 426 | nextConfig: { channels: { whatsapp: {} } }, |
427 | 427 | baseHash: "config-1", |
428 | 428 | }); |
429 | | -expect(mocks.login).toHaveBeenCalled(); |
| 429 | +expect(mocks.login).toHaveBeenCalledTimes(1); |
430 | 430 | }); |
431 | 431 | |
432 | 432 | it("strips pending install records before persisting install-on-demand login config", async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。