

























@@ -20,6 +20,16 @@ import {
20202121vi.unmock("../version.js");
222223+function expectActiveSecretsRuntimeSnapshot(): NonNullable<
24+ReturnType<typeof getActiveSecretsRuntimeSnapshot>
25+> {
26+const snapshot = getActiveSecretsRuntimeSnapshot();
27+if (snapshot === null) {
28+throw new Error("Expected active secrets runtime snapshot");
29+}
30+return snapshot;
31+}
32+2333describe("secrets runtime snapshot auth refresh failure", () => {
2434let envSnapshot: SecretsRuntimeEnvSnapshot;
2535@@ -75,10 +85,9 @@ describe("secrets runtime snapshot auth refresh failure", () => {
7585}),
7686).rejects.toThrow(/simulated secrets runtime refresh failure/i);
778778-const activeAfterFailure = getActiveSecretsRuntimeSnapshot();
79-expect(activeAfterFailure).not.toBeNull();
88+const activeAfterFailure = expectActiveSecretsRuntimeSnapshot();
8089expectResolvedOpenAIRuntime(agentDir);
81-expect(activeAfterFailure?.sourceConfig.models?.providers?.openai?.apiKey).toEqual(
90+expect(activeAfterFailure.sourceConfig.models?.providers?.openai?.apiKey).toEqual(
8291OPENAI_FILE_KEY_REF,
8392);
8493});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。