test: tighten provider rewrite assertions · openclaw/openclaw@9491176
steipete
·
2026-05-08
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -271,6 +271,7 @@ function expectCopilotProviderFromPlan(
|
271 | 271 | plan.action === "write" |
272 | 272 | ? (JSON.parse(plan.contents) as { providers?: Record<string, unknown> }) |
273 | 273 | : {}; |
274 | | -expect(parsed.providers?.["github-copilot"]).toEqual(expect.any(Object)); |
| 274 | +expect(parsed.providers?.["github-copilot"]).toBeDefined(); |
| 275 | +expect(parsed.providers?.["github-copilot"]).not.toBeNull(); |
275 | 276 | return expect(parsed.providers?.["github-copilot"]); |
276 | 277 | } |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -201,7 +201,8 @@ describe("buildContextEngineMaintenanceRuntimeContext", () => {
|
201 | 201 | { entryId: "entry-1", message: { role: "user", content: "hi", timestamp: 1 } }, |
202 | 202 | ], |
203 | 203 | }); |
204 | | -expect(rewritePromise).toEqual(expect.any(Promise)); |
| 204 | +expect(rewritePromise).toBeDefined(); |
| 205 | +expect(rewritePromise?.then).toBeTypeOf("function"); |
205 | 206 | |
206 | 207 | await flushAsyncWork(); |
207 | 208 | expect(rewriteTranscriptEntriesInSessionFileMock).not.toHaveBeenCalled(); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。