fix:通过E2E测试

This commit is contained in:
2026-03-10 00:52:59 +08:00
parent cef68a95d9
commit d206c79c24
8 changed files with 43 additions and 33 deletions

View File

@@ -1,9 +1,5 @@
import { describe, it, expect, beforeEach } from "vitest";
import {
downloads,
addDownload,
removeDownloadItem,
} from "@/global/downloadStatus";
import { downloads, removeDownloadItem } from "@/global/downloadStatus";
import type { DownloadItem } from "@/global/typedefinition";
describe("downloadStatus", () => {
@@ -31,7 +27,7 @@ describe("downloadStatus", () => {
retry: false,
};
addDownload(mockDownload);
downloads.value.push(mockDownload);
expect(downloads.value).toHaveLength(1);
expect(downloads.value[0].pkgname).toBe("test-app");