test: tighten openai runtime helper assertions · openclaw/openclaw@44ae23a
steipete
·
2026-05-10
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -106,8 +106,9 @@ export function expectResolvedOpenAIRuntime(agentDir: string) {
|
106 | 106 | const activeAuthStore = getActiveSecretsRuntimeSnapshot()?.authStores.find( |
107 | 107 | (entry) => entry.agentDir === agentDir, |
108 | 108 | )?.store; |
109 | | -expect(activeAuthStore?.profiles["openai:default"]).toMatchObject({ |
110 | | -type: "api_key", |
111 | | -key: "sk-file-runtime", |
112 | | -}); |
| 109 | +const openaiProfile = activeAuthStore?.profiles["openai:default"]; |
| 110 | +expect(openaiProfile?.type).toBe("api_key"); |
| 111 | +if (openaiProfile?.type === "api_key") { |
| 112 | +expect(openaiProfile.key).toBe("sk-file-runtime"); |
| 113 | +} |
113 | 114 | } |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。