test: require channel command messages · openclaw/openclaw@a66531e
shakkernerd
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -745,9 +745,7 @@ describe("channelsAddCommand", () => {
|
745 | 745 | expect(loadChannelSetupPluginRegistrySnapshotForChannel).toHaveBeenCalledTimes(1); |
746 | 746 | expect(writtenChannel("telegram").enabled).toBe(true); |
747 | 747 | expect(writtenChannel("telegram").botToken).toBe("123456:token"); |
748 | | -expect(runtime.error).not.toHaveBeenCalledWith( |
749 | | -expect.stringContaining("Channel telegram does not support non-interactive add"), |
750 | | -); |
| 748 | +expect(runtime.error).not.toHaveBeenCalled(); |
751 | 749 | expect(runtime.exit).not.toHaveBeenCalled(); |
752 | 750 | }); |
753 | 751 | |
@@ -790,9 +788,7 @@ describe("channelsAddCommand", () => {
|
790 | 788 | expect(getBundledChannelSetupPlugin).toHaveBeenCalledWith("telegram"); |
791 | 789 | expect(writtenChannel("telegram").enabled).toBe(true); |
792 | 790 | expect(writtenChannel("telegram").botToken).toBe("123456:token"); |
793 | | -expect(runtime.error).not.toHaveBeenCalledWith( |
794 | | -expect.stringContaining("Channel telegram does not support non-interactive add"), |
795 | | -); |
| 791 | +expect(runtime.error).not.toHaveBeenCalled(); |
796 | 792 | expect(runtime.exit).not.toHaveBeenCalled(); |
797 | 793 | }); |
798 | 794 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -129,10 +129,7 @@ describe("channelsRemoveCommand", () => {
|
129 | 129 | expect(loadChannelSetupPluginRegistrySnapshotForChannel).toHaveBeenCalledTimes(1); |
130 | 130 | expect(configMocks.writeConfigFile).not.toHaveBeenCalled(); |
131 | 131 | expect(runtime.error).toHaveBeenCalledWith( |
132 | | -expect.stringContaining('Channel plugin "external-chat" is not installed. Run '), |
133 | | -); |
134 | | -expect(runtime.error).toHaveBeenCalledWith( |
135 | | -expect.stringContaining("channels add --channel external-chat"), |
| 132 | +'Channel plugin "external-chat" is not installed. Run openclaw channels add --channel external-chat first.', |
136 | 133 | ); |
137 | 134 | expect(runtime.exit).toHaveBeenCalledWith(1); |
138 | 135 | }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。