From b60ae89aa4a299929d0b67e1d99101504d21052b Mon Sep 17 00:00:00 2001 From: Shakker Date: Tue, 12 May 2026 20:33:44 +0100 Subject: [PATCH] test: settle plugin repair noops --- .../missing-configured-plugin-install.test.ts | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/commands/doctor/shared/missing-configured-plugin-install.test.ts b/src/commands/doctor/shared/missing-configured-plugin-install.test.ts index 150c17678d77..c570dad7f950 100644 --- a/src/commands/doctor/shared/missing-configured-plugin-install.test.ts +++ b/src/commands/doctor/shared/missing-configured-plugin-install.test.ts @@ -617,7 +617,7 @@ describe("repairMissingConfiguredPluginInstalls", () => { expect(mocks.installPluginFromClawHub).not.toHaveBeenCalled(); expect(mocks.installPluginFromNpmSpec).not.toHaveBeenCalled(); expect(mocks.writePersistedInstalledPluginIndexInstallRecords).not.toHaveBeenCalled(); - expect(result).toMatchObject({ changes: [], warnings: [] }); + expect(result).toEqual({ changes: [], warnings: [], records: {} }); }); it("removes stale managed install records when the configured plugin is bundled", async () => { @@ -876,7 +876,7 @@ describe("repairMissingConfiguredPluginInstalls", () => { expect(mocks.installPluginFromClawHub).not.toHaveBeenCalled(); expect(mocks.installPluginFromNpmSpec).not.toHaveBeenCalled(); expect(mocks.writePersistedInstalledPluginIndexInstallRecords).not.toHaveBeenCalled(); - expect(result).toMatchObject({ changes: [], warnings: [] }); + expect(result).toEqual({ changes: [], warnings: [], records }); }, ); @@ -1057,7 +1057,7 @@ describe("repairMissingConfiguredPluginInstalls", () => { expect(mocks.installPluginFromClawHub).not.toHaveBeenCalled(); expect(mocks.installPluginFromNpmSpec).not.toHaveBeenCalled(); expect(mocks.writePersistedInstalledPluginIndexInstallRecords).not.toHaveBeenCalled(); - expect(result).toMatchObject({ changes: [], warnings: [] }); + expect(result).toEqual({ changes: [], warnings: [], records: {} }); }); it("does not install configured plugins when plugins are globally disabled", async () => { @@ -1115,7 +1115,7 @@ describe("repairMissingConfiguredPluginInstalls", () => { expect(mocks.installPluginFromClawHub).not.toHaveBeenCalled(); expect(mocks.installPluginFromNpmSpec).not.toHaveBeenCalled(); expect(mocks.writePersistedInstalledPluginIndexInstallRecords).not.toHaveBeenCalled(); - expect(result).toMatchObject({ changes: [], warnings: [] }); + expect(result).toEqual({ changes: [], warnings: [], records: {} }); }); it("does not install plugins merely listed in plugins.allow", async () => { @@ -1132,7 +1132,7 @@ describe("repairMissingConfiguredPluginInstalls", () => { expect(mocks.installPluginFromNpmSpec).not.toHaveBeenCalled(); expect(mocks.writePersistedInstalledPluginIndexInstallRecords).not.toHaveBeenCalled(); - expect(result).toMatchObject({ changes: [], warnings: [] }); + expect(result).toEqual({ changes: [], warnings: [], records: {} }); }); it("installs a missing third-party downloadable plugin from npm only", async () => { @@ -1398,10 +1398,7 @@ describe("repairMissingConfiguredPluginInstalls", () => { expect(mocks.installPluginFromNpmSpec).not.toHaveBeenCalled(); expect(mocks.writePersistedInstalledPluginIndexInstallRecords).not.toHaveBeenCalled(); - expect(result).toMatchObject({ - changes: [], - warnings: [], - }); + expect(result).toEqual({ changes: [], warnings: [], records: {} }); }); it("does not install a blocked downloadable plugin from explicit channel ids", async () => { @@ -1428,7 +1425,7 @@ describe("repairMissingConfiguredPluginInstalls", () => { expect(mocks.installPluginFromClawHub).not.toHaveBeenCalled(); expect(mocks.installPluginFromNpmSpec).not.toHaveBeenCalled(); - expect(result).toMatchObject({ changes: [], warnings: [] }); + expect(result).toEqual({ changes: [], warnings: [], records: {} }); }); it("does not install a channel catalog plugin when a configured plugin already owns that channel", async () => { @@ -1486,7 +1483,7 @@ describe("repairMissingConfiguredPluginInstalls", () => { expect(mocks.installPluginFromClawHub).not.toHaveBeenCalled(); expect(mocks.installPluginFromNpmSpec).not.toHaveBeenCalled(); expect(mocks.writePersistedInstalledPluginIndexInstallRecords).not.toHaveBeenCalled(); - expect(result).toMatchObject({ changes: [], warnings: [] }); + expect(result).toEqual({ changes: [], warnings: [], records: {} }); }); it("still installs a channel catalog plugin when the configured owner is blocked by the allowlist", async () => { @@ -2339,6 +2336,6 @@ describe("repairMissingConfiguredPluginInstalls", () => { expect(mocks.installPluginFromClawHub).not.toHaveBeenCalled(); expect(mocks.installPluginFromNpmSpec).not.toHaveBeenCalled(); expect(mocks.writePersistedInstalledPluginIndexInstallRecords).not.toHaveBeenCalled(); - expect(result).toMatchObject({ changes: [], warnings: [] }); + expect(result).toEqual({ changes: [], warnings: [], records: {} }); }); });