mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 01:20:42 +00:00
test: tighten update startup absence assertion
This commit is contained in:
@@ -151,6 +151,10 @@ describe("update-startup", () => {
|
||||
return { log, parsed };
|
||||
}
|
||||
|
||||
async function expectPathMissing(targetPath: string): Promise<void> {
|
||||
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 () => {
|
||||
|
||||
Reference in New Issue
Block a user