test: measure msteams upload options · openclaw/openclaw@0d9c38f
shakkernerd
·
2026-05-13
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -334,12 +334,15 @@ describe("uploadToConsentUrl", () => {
|
334 | 334 | expect(mockFetch).toHaveBeenCalledOnce(); |
335 | 335 | const [url, opts] = firstFetchCall(mockFetch); |
336 | 336 | expect(url).toBe("https://contoso.sharepoint.com/sites/uploads/file.pdf"); |
337 | | -expect(opts?.method).toBe("PUT"); |
338 | | -expect(opts?.headers).toEqual( |
339 | | -expect.objectContaining({ |
| 337 | +expect(opts).toEqual({ |
| 338 | +method: "PUT", |
| 339 | +headers: { |
| 340 | +"User-Agent": buildUserAgent(), |
340 | 341 | "Content-Type": "application/pdf", |
341 | | -}), |
342 | | -); |
| 342 | +"Content-Range": "bytes 0-11/12", |
| 343 | +}, |
| 344 | +body: new Uint8Array(buffer), |
| 345 | +}); |
343 | 346 | }); |
344 | 347 | |
345 | 348 | it("throws on non-OK response after passing validation", async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。