test: clear qa credential lease broad matcher · openclaw/openclaw@c7a281a
steipete
·
2026-05-10
·
via Recent Commits to openclaw:main
File tree
extensions/qa-lab/src/live-transports/shared
| Original file line number | Diff line number | Diff line change |
|---|
@@ -126,11 +126,16 @@ describe("credential lease runtime", () => {
|
126 | 126 | expect(fetchImpl.mock.calls[1]?.[0]).toBe( |
127 | 127 | "https://qa-cred.example.convex.site/qa-credentials/v1/payload-chunk", |
128 | 128 | ); |
129 | | -expect(JSON.parse(String(fetchImpl.mock.calls[1]?.[1]?.body))).toMatchObject({ |
130 | | -credentialId: "cred-chunked", |
131 | | -index: 0, |
132 | | -leaseToken: "lease-chunked", |
133 | | -}); |
| 129 | +const chunkRequestBody = fetchImpl.mock.calls[1]?.[1]?.body; |
| 130 | +expect(chunkRequestBody).toBeTypeOf("string"); |
| 131 | +const chunkRequest = JSON.parse(chunkRequestBody as string) as { |
| 132 | +credentialId?: string; |
| 133 | +index?: number; |
| 134 | +leaseToken?: string; |
| 135 | +}; |
| 136 | +expect(chunkRequest.credentialId).toBe("cred-chunked"); |
| 137 | +expect(chunkRequest.index).toBe(0); |
| 138 | +expect(chunkRequest.leaseToken).toBe("lease-chunked"); |
134 | 139 | }); |
135 | 140 | |
136 | 141 | it("defaults convex credential role to maintainer outside CI", async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。