update 修复更新工具缺少软件名检查的问题

This commit is contained in:
2026-04-12 19:39:17 +08:00
parent 60628ff1fa
commit 67aa83fe26
5 changed files with 111 additions and 24 deletions
@@ -262,6 +262,27 @@ describe("update-center/ipc", () => {
await startPromise;
});
it("service item snapshots prefer resolved app names over package names", async () => {
const service = createUpdateCenterService({
loadItems: async () => [
{
...createItem(),
name: "Spark Weather",
},
],
});
const snapshot = await service.refresh();
expect(snapshot.items).toMatchObject([
{
taskKey: "aptss:spark-weather",
packageName: "spark-weather",
displayName: "Spark Weather",
},
]);
});
it("concurrent start calls still serialize through one processing pipeline", async () => {
const startedTaskIds: number[] = [];
const releases: Array<() => void> = [];