test: fix CI type checks · openclaw/openclaw@eac918d
steipete
·
2026-05-27
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -53,7 +53,9 @@ describe("docsSearchCommand", () => {
|
53 | 53 | |
54 | 54 | expect(fetchMock).toHaveBeenCalledTimes(1); |
55 | 55 | const [url, init] = fetchMock.mock.calls[0]; |
56 | | -expect(url).toBeInstanceOf(URL); |
| 56 | +if (!(url instanceof URL)) { |
| 57 | +throw new Error("expected docs search to call fetch with a URL"); |
| 58 | +} |
57 | 59 | expect(url.href).toBe("https://docs.openclaw.ai/api/search?q=plugin+allowlist"); |
58 | 60 | expect(init).toMatchObject({ headers: { Accept: "application/json" } }); |
59 | 61 | }); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -149,7 +149,6 @@ describe("ensurePluginRegistryLoaded", () => {
|
149 | 149 | mocks.resolveRuntimePluginRegistry.mockImplementation( |
150 | 150 | (...args: Parameters<typeof mocks.loadOpenClawPlugins>) => mocks.loadOpenClawPlugins(...args), |
151 | 151 | ); |
152 | | -mocks.resolvePluginMetadataSnapshot.mockReturnValue(undefined); |
153 | 152 | mocks.applyPluginAutoEnable.mockImplementation((params) => ({ |
154 | 153 | config: |
155 | 154 | params.config && typeof params.config === "object" |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。