test: tighten custom theme fetch assertions · openclaw/openclaw@657d233
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -186,11 +186,12 @@ describe("custom theme import helpers", () => {
|
186 | 186 | { headers?: unknown; redirect?: unknown; signal?: unknown }, |
187 | 187 | ]; |
188 | 188 | expect(fetchUrl).toBe("https://tweakcn.com/r/themes/cmlhfpjhw000004l4f4ax3m7z"); |
189 | | -expect(fetchOptions).toMatchObject({ |
| 189 | +expect(fetchOptions.signal).toBeInstanceOf(AbortSignal); |
| 190 | +expect(fetchOptions).toEqual({ |
190 | 191 | headers: { accept: "application/json" }, |
191 | 192 | redirect: "error", |
| 193 | +signal: fetchOptions.signal, |
192 | 194 | }); |
193 | | -expect(fetchOptions.signal).toBeInstanceOf(AbortSignal); |
194 | 195 | }); |
195 | 196 | |
196 | 197 | it("rejects oversized tweakcn theme responses before parsing", async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。