test: invoke whatsapp setup validators · openclaw/openclaw@765ca52
steipete
·
2026-05-08
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -16,7 +16,18 @@ describe("whatsapp setup entry", () => {
|
16 | 16 | |
17 | 17 | const whatsappSetupPlugin = setupEntry.loadSetupPlugin(); |
18 | 18 | expect(whatsappSetupPlugin.id).toBe("whatsapp"); |
19 | | -expect(setupEntry.loadLegacyStateMigrationDetector?.()).toEqual(expect.any(Function)); |
| 19 | +const detectLegacyStateMigrations = setupEntry.loadLegacyStateMigrationDetector?.(); |
| 20 | +if (!detectLegacyStateMigrations) { |
| 21 | +throw new Error("expected WhatsApp legacy state migration detector"); |
| 22 | +} |
| 23 | +expect( |
| 24 | +detectLegacyStateMigrations({ |
| 25 | +cfg: {}, |
| 26 | +env: {}, |
| 27 | +oauthDir: "/tmp/openclaw-whatsapp-empty", |
| 28 | +stateDir: "/tmp/openclaw-state", |
| 29 | +}), |
| 30 | +).toEqual([]); |
20 | 31 | expect(setupEntry.loadLegacySessionSurface?.()).toEqual({ |
21 | 32 | canonicalizeLegacySessionKey: expect.any(Function), |
22 | 33 | isLegacyGroupSessionKey: expect.any(Function), |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。