test: complete backup asset helper · openclaw/openclaw@eec0d16
shakkernerd
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -141,8 +141,15 @@ describe("backup commands", () => {
|
141 | 141 | expect(path.relative(included.sourcePath, skipped.sourcePath).startsWith("..")).toBe(false); |
142 | 142 | } |
143 | 143 | |
144 | | -function expectOnlyAssetKind(assets: Array<{ kind: string }>, kind: string) { |
145 | | -expect(assets).toStrictEqual([expect.objectContaining({ kind })]); |
| 144 | +function expectOnlyAssetKind(assets: BackupAsset[], kind: BackupAsset["kind"]) { |
| 145 | +expect(assets).toStrictEqual([ |
| 146 | +{ |
| 147 | + kind, |
| 148 | +sourcePath: expect.any(String), |
| 149 | +displayPath: expect.any(String), |
| 150 | +archivePath: expect.stringContaining("/payload/"), |
| 151 | +}, |
| 152 | +]); |
146 | 153 | } |
147 | 154 | |
148 | 155 | it("collapses default config, credentials, and workspace into the state backup root", async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。