test: complete backup asset helper

This commit is contained in:
Shakker
2026-05-11 22:47:02 +01:00
parent 1c03a34813
commit eec0d16458

View File

@@ -141,8 +141,15 @@ describe("backup commands", () => {
expect(path.relative(included.sourcePath, skipped.sourcePath).startsWith("..")).toBe(false);
}
function expectOnlyAssetKind(assets: Array<{ kind: string }>, kind: string) {
expect(assets).toStrictEqual([expect.objectContaining({ kind })]);
function expectOnlyAssetKind(assets: BackupAsset[], kind: BackupAsset["kind"]) {
expect(assets).toStrictEqual([
{
kind,
sourcePath: expect.any(String),
displayPath: expect.any(String),
archivePath: expect.stringContaining("/payload/"),
},
]);
}
it("collapses default config, credentials, and workspace into the state backup root", async () => {