fix: synced plugin updates failing on desktop and server-only plugins shown as stopped

This commit is contained in:
LukeGus committed 2026-10-11 12:07:22 -05:00
1 parent e92db4e9f8
commit 91e1ee94fa
12 files changed
+261 -12

No files matched your search

+11
View File
@@ -125,6 +125,14 @@ describe("mergePlugins", () => {
);
});
it("offers no update for a plugin a linked desktop leaves to its server", () => {
const [row] = mergePlugins(
[summary({ enabled: false, state: "disabled", runsOnServer: true })],
[entry()],
);
expect(row).toMatchObject({ status: "server", updateAvailable: false });
});
it("keeps installed plugins when the registry is unreachable", () => {
const rows = mergePlugins([summary()], null);
expect(rows).toHaveLength(1);
@@ -140,6 +148,9 @@ describe("pluginStatus", () => {
"disabled",
);
expect(pluginStatus(summary())).toBe("running");
expect(pluginStatus(summary({ state: "failed", runsOnServer: true }))).toBe(
"server",
);
});
});