From 55439d81a1335fa0b60dfac23bbd6f256f87fa1b Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 9 May 2026 02:46:28 +0100 Subject: [PATCH] test: tighten update startup absence assertion --- src/infra/update-startup.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/infra/update-startup.test.ts b/src/infra/update-startup.test.ts index 793a1d87b1b..cf53f19377b 100644 --- a/src/infra/update-startup.test.ts +++ b/src/infra/update-startup.test.ts @@ -151,6 +151,10 @@ describe("update-startup", () => { return { log, parsed }; } + async function expectPathMissing(targetPath: string): Promise { + await expect(fs.stat(targetPath)).rejects.toMatchObject({ code: "ENOENT" }); + } + function createAutoUpdateSuccessMock() { return vi.fn().mockResolvedValue({ ok: true, @@ -295,7 +299,7 @@ describe("update-startup", () => { }); expect(log.info).not.toHaveBeenCalled(); - await expect(fs.stat(path.join(tempDir, "update-check.json"))).rejects.toThrow(); + await expectPathMissing(path.join(tempDir, "update-check.json")); }); it("defers stable auto-update until rollout window is due", async () => {