test: tighten supervisor capture assertion · openclaw/openclaw@937c474
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -220,12 +220,15 @@ describe("executePreparedCliRun supervisor output capture", () => {
|
220 | 220 | }); |
221 | 221 | }); |
222 | 222 | |
223 | | -await expect( |
224 | | -executePreparedCliRun(buildPreparedCliRunContext({ output: "text" })), |
225 | | -).rejects.toMatchObject({ |
226 | | -reason: "rate_limit", |
227 | | -status: 429, |
228 | | -}); |
| 223 | +try { |
| 224 | +await executePreparedCliRun(buildPreparedCliRunContext({ output: "text" })); |
| 225 | +} catch (error) { |
| 226 | +const classified = error as { reason?: unknown; status?: unknown }; |
| 227 | +expect(classified.reason).toBe("rate_limit"); |
| 228 | +expect(classified.status).toBe(429); |
| 229 | +return; |
| 230 | +} |
| 231 | +throw new Error("Expected CLI run to reject with a rate limit error"); |
229 | 232 | }); |
230 | 233 | |
231 | 234 | it("still streams every JSONL stdout chunk with supervisor capture disabled", async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。