test: tighten ssrf dispatcher assertions · openclaw/openclaw@9c9b719
steipete
·
2026-05-11
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -88,16 +88,15 @@ describe("createPinnedDispatcher", () => {
|
88 | 88 | |
89 | 89 | const dispatcher = createPinnedDispatcher(pinned); |
90 | 90 | |
91 | | -expect(dispatcher).toMatchObject({ |
92 | | -options: { |
93 | | -connect: { |
94 | | - lookup, |
95 | | -autoSelectFamily: true, |
96 | | -autoSelectFamilyAttemptTimeout: 300, |
97 | | -}, |
98 | | -allowH2: false, |
99 | | -}, |
100 | | -}); |
| 91 | +const dispatcherOptions = ( |
| 92 | +dispatcher as { |
| 93 | +options?: { allowH2?: boolean; connect?: Record<string, unknown> }; |
| 94 | +} |
| 95 | +).options; |
| 96 | +expect(dispatcherOptions?.connect?.lookup).toBe(lookup); |
| 97 | +expect(dispatcherOptions?.connect?.autoSelectFamily).toBe(true); |
| 98 | +expect(dispatcherOptions?.connect?.autoSelectFamilyAttemptTimeout).toBe(300); |
| 99 | +expect(dispatcherOptions?.allowH2).toBe(false); |
101 | 100 | expect(agentCtor).toHaveBeenCalledWith({ |
102 | 101 | connect: { |
103 | 102 | lookup, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。