fix(update): verify and apply the actual latest version
This commit is contained in:
+11
-2
@@ -44,8 +44,17 @@ afterEach(() => {
|
||||
vi.restoreAllMocks();
|
||||
});
|
||||
|
||||
describe("update", () => {
|
||||
it("normalizes update repo input", () => {
|
||||
describe("update", () => {
|
||||
it("always refreshes release metadata before installing instead of using the previous check result", () => {
|
||||
const controller = fs.readFileSync(new URL("../src/main/app-controller.ts", import.meta.url), "utf8");
|
||||
const install = controller.slice(controller.indexOf("public async installUpdate"), controller.indexOf("public addLinks"));
|
||||
|
||||
expect(install).toContain("installLatestUpdate(this.settings.updateRepo, undefined, onProgress)");
|
||||
expect(install).not.toContain("cacheAgeMs");
|
||||
expect(install).not.toContain("this.lastUpdateCheck &&");
|
||||
});
|
||||
|
||||
it("normalizes update repo input", () => {
|
||||
expect(normalizeUpdateRepo("")).toBe("Sucukdeluxe/Multi-Debrid-Downloader");
|
||||
expect(normalizeUpdateRepo("owner/repo")).toBe("owner/repo");
|
||||
expect(normalizeUpdateRepo("https://github.com/owner/repo")).toBe("owner/repo");
|
||||
|
||||
Reference in New Issue
Block a user