test: tighten custom api registry assertions · openclaw/openclaw@87dc900
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -29,10 +29,9 @@ describe("ensureCustomApiRegistered", () => {
|
29 | 29 | expect(ensureCustomApiRegistered("test-custom-api", streamFn)).toBe(true); |
30 | 30 | expect(ensureCustomApiRegistered("test-custom-api", streamFn)).toBe(false); |
31 | 31 | |
32 | | -expect(getRegisteredTestProvider()).toMatchObject({ |
33 | | -stream: expect.any(Function), |
34 | | -streamSimple: expect.any(Function), |
35 | | -}); |
| 32 | +const provider = getRegisteredTestProvider(); |
| 33 | +expect(typeof provider.stream).toBe("function"); |
| 34 | +expect(typeof provider.streamSimple).toBe("function"); |
36 | 35 | }); |
37 | 36 | |
38 | 37 | it("delegates both stream entrypoints to the provided stream function", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。