test: inspect command json records · openclaw/openclaw@7089862
shakkernerd
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -155,9 +155,19 @@ describe("sandboxListCommand", () => {
|
155 | 155 | const loggedJson = runtime.log.mock.calls[0][0]; |
156 | 156 | const parsed = JSON.parse(loggedJson); |
157 | 157 | |
158 | | -expect(parsed.containers).toHaveLength(1); |
159 | | -expect(parsed.containers[0].containerName).toBe(container.containerName); |
160 | | -expect(parsed.browsers).toHaveLength(0); |
| 158 | +expect(parsed.containers).toStrictEqual([ |
| 159 | +expect.objectContaining({ |
| 160 | +backendId: "docker", |
| 161 | +configLabelKind: "Image", |
| 162 | +containerName: container.containerName, |
| 163 | +image: "openclaw/sandbox:latest", |
| 164 | +imageMatch: true, |
| 165 | +running: true, |
| 166 | +runtimeLabel: container.containerName, |
| 167 | +sessionKey: "test-session", |
| 168 | +}), |
| 169 | +]); |
| 170 | +expect(parsed.browsers).toStrictEqual([]); |
161 | 171 | }); |
162 | 172 | }); |
163 | 173 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。