test: clarify plugin uninstall log assertions · openclaw/openclaw@b0966f5
shakkernerd
·
2026-05-08
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -104,8 +104,12 @@ describe("plugins cli uninstall", () => {
|
104 | 104 | expect(planPluginUninstall).toHaveBeenCalled(); |
105 | 105 | expect(writeConfigFile).not.toHaveBeenCalled(); |
106 | 106 | expect(refreshPluginRegistry).not.toHaveBeenCalled(); |
107 | | -expect(runtimeLogs.some((line) => line.includes("Dry run, no changes made."))).toBe(true); |
108 | | -expect(runtimeLogs.some((line) => line.includes("context engine slot"))).toBe(true); |
| 107 | +expect(runtimeLogs).toEqual( |
| 108 | +expect.arrayContaining([expect.stringContaining("Dry run, no changes made.")]), |
| 109 | +); |
| 110 | +expect(runtimeLogs).toEqual( |
| 111 | +expect.arrayContaining([expect.stringContaining("context engine slot")]), |
| 112 | +); |
109 | 113 | }); |
110 | 114 | |
111 | 115 | it("uninstalls with --force and --keep-files without prompting", async () => { |
@@ -515,7 +519,9 @@ describe("plugins cli uninstall", () => {
|
515 | 519 | ); |
516 | 520 | expect(writePersistedInstalledPluginIndexInstallRecords).toHaveBeenCalledWith({}); |
517 | 521 | expect(writeConfigFile).toHaveBeenCalledWith(nextConfig); |
518 | | -expect(runtimeLogs.some((line) => line.includes("channel config (channels.alpha)"))).toBe(true); |
| 522 | +expect(runtimeLogs).toEqual( |
| 523 | +expect.arrayContaining([expect.stringContaining("channel config (channels.alpha)")]), |
| 524 | +); |
519 | 525 | expect(runtimeLogs.at(-2)).toContain('Uninstalled plugin "alpha"'); |
520 | 526 | }); |
521 | 527 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。