test: guard provider runtime mock calls · openclaw/openclaw@0c2068f
steipete
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -669,7 +669,7 @@ describe("provider-runtime", () => {
|
669 | 669 | } |
670 | 670 | |
671 | 671 | expect(providerRuntimeWarnMock).toHaveBeenCalledTimes(1); |
672 | | -const warning = String(providerRuntimeWarnMock.mock.calls[0]?.[0] ?? ""); |
| 672 | +const warning = String(providerRuntimeWarnMock.mock.calls.at(0)?.[0] ?? ""); |
673 | 673 | expect(warning).toContain('Provider plugin "legacy-providerWARN forged"'); |
674 | 674 | expect(warning).not.toContain("\n"); |
675 | 675 | }); |
@@ -870,7 +870,7 @@ describe("provider-runtime", () => {
|
870 | 870 | }, |
871 | 871 | }); |
872 | 872 | expectRecordFields( |
873 | | -requireRecord(extraParamsForTransport.mock.calls[0]?.[0], "transport params context"), |
| 873 | +requireRecord(extraParamsForTransport.mock.calls.at(0)?.[0], "transport params context"), |
874 | 874 | { |
875 | 875 | provider: DEMO_PROVIDER_ID, |
876 | 876 | modelId: MODEL.id, |
@@ -1007,7 +1007,7 @@ describe("provider-runtime", () => {
|
1007 | 1007 | expect(contribution?.stablePrefix).toContain("provider overlay"); |
1008 | 1008 | expect(contribution?.sectionOverrides?.execution_bias).toBe("saw built-in overlay"); |
1009 | 1009 | const overlayContext = requireRecord( |
1010 | | -resolvePromptOverlay.mock.calls[0]?.[0], |
| 1010 | +resolvePromptOverlay.mock.calls.at(0)?.[0], |
1011 | 1011 | "overlay context", |
1012 | 1012 | ); |
1013 | 1013 | expect(overlayContext.provider).toBe("openrouter"); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。