@@ -33,10 +33,10 @@ function expectLatestUninstallPlanParams(expected: {
|
33 | 33 | deleteFiles: boolean; |
34 | 34 | channelIds?: unknown; |
35 | 35 | }) { |
36 | | -expect(planPluginUninstall).toHaveBeenCalled(); |
37 | 36 | const params = planPluginUninstall.mock.calls.at(-1)?.[0] as |
38 | 37 | | { pluginId?: string; deleteFiles?: boolean; channelIds?: unknown } |
39 | 38 | | undefined; |
| 39 | +expect(params).toBeDefined(); |
40 | 40 | expect(params?.pluginId).toBe(expected.pluginId); |
41 | 41 | expect(params?.deleteFiles).toBe(expected.deleteFiles); |
42 | 42 | if ("channelIds" in expected) { |
@@ -119,9 +119,9 @@ describe("plugins cli uninstall", () => {
|
119 | 119 | |
120 | 120 | await runPluginsCommand(["plugins", "uninstall", "alpha", "--dry-run"]); |
121 | 121 | |
122 | | -expect(buildPluginSnapshotReport).toHaveBeenCalled(); |
| 122 | +expect(buildPluginSnapshotReport).toHaveBeenCalledTimes(1); |
123 | 123 | expect(buildPluginDiagnosticsReport).not.toHaveBeenCalled(); |
124 | | -expect(planPluginUninstall).toHaveBeenCalled(); |
| 124 | +expect(planPluginUninstall).toHaveBeenCalledTimes(1); |
125 | 125 | expect(writeConfigFile).not.toHaveBeenCalled(); |
126 | 126 | expect(refreshPluginRegistry).not.toHaveBeenCalled(); |
127 | 127 | expectRuntimeLogIncludes("Dry run, no changes made."); |
@@ -543,6 +543,6 @@ describe("plugins cli uninstall", () => {
|
543 | 543 | ); |
544 | 544 | |
545 | 545 | expect(runtimeErrors.at(-1)).toContain("is not managed by plugins config/install records"); |
546 | | -expect(planPluginUninstall).toHaveBeenCalled(); |
| 546 | +expect(planPluginUninstall).toHaveBeenCalledTimes(1); |
547 | 547 | }); |
548 | 548 | }); |