mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-15 23:30:43 +00:00
test: tighten backup json assertion
This commit is contained in:
@@ -354,7 +354,8 @@ describe("backup commands", () => {
|
||||
throw new Error("backup test expected JSON string output");
|
||||
}
|
||||
expect(payload).not.toContain("Backup skipped");
|
||||
expect(JSON.parse(payload)).toMatchObject({ skippedVolatileCount: 1 });
|
||||
const parsedPayload = JSON.parse(payload) as { skippedVolatileCount?: unknown };
|
||||
expect(parsedPayload.skippedVolatileCount).toBe(1);
|
||||
} finally {
|
||||
await fs.rm(backupDir, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user