mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-12 18:40:42 +00:00
test: tighten backup manifest callback assertions
This commit is contained in:
@@ -210,12 +210,11 @@ describe("backup commands", () => {
|
||||
expect(result.archivePath).toBe(
|
||||
path.join(backupDir, `${buildBackupArchiveRoot(nowMs)}.tar.gz`),
|
||||
);
|
||||
expect(capturedManifest).not.toBeNull();
|
||||
expect(capturedOnWriteEntry).not.toBeNull();
|
||||
const manifest = capturedManifest as unknown as {
|
||||
assets: Array<{ kind: string; archivePath: string }>;
|
||||
};
|
||||
const onWriteEntry = capturedOnWriteEntry as unknown as (entry: { path: string }) => void;
|
||||
if (capturedManifest === null || capturedOnWriteEntry === null) {
|
||||
throw new Error("Expected backup manifest and archive entry callback");
|
||||
}
|
||||
const manifest = capturedManifest;
|
||||
const onWriteEntry = capturedOnWriteEntry;
|
||||
expect(manifest.assets).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({ kind: "state" }),
|
||||
|
||||
Reference in New Issue
Block a user