test: require auto reply prep callbacks · openclaw/openclaw@ae2ae46
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -931,7 +931,7 @@ describe("runPreparedReply media-only handling", () => {
|
931 | 931 | await import("../../agents/auth-profiles/session-override.js"); |
932 | 932 | const queueSettings = await import("./queue/settings-runtime.js"); |
933 | 933 | |
934 | | -let resolveAuth!: () => void; |
| 934 | +let resolveAuth: (() => void) | undefined; |
935 | 935 | const authPromise = new Promise<void>((resolve) => { |
936 | 936 | resolveAuth = resolve; |
937 | 937 | }); |
@@ -957,6 +957,9 @@ describe("runPreparedReply media-only handling", () => {
|
957 | 957 | resetTriggered: false, |
958 | 958 | }); |
959 | 959 | intruderRun.setPhase("running"); |
| 960 | +if (!resolveAuth) { |
| 961 | +throw new Error("Expected auth profile resolver to be initialized"); |
| 962 | +} |
960 | 963 | resolveAuth(); |
961 | 964 | |
962 | 965 | await Promise.resolve(); |
@@ -1019,7 +1022,7 @@ describe("runPreparedReply media-only handling", () => {
|
1019 | 1022 | await import("../../agents/auth-profiles/session-override.js"); |
1020 | 1023 | const queueSettings = await import("./queue/settings-runtime.js"); |
1021 | 1024 | |
1022 | | -let resolveAuth!: () => void; |
| 1025 | +let resolveAuth: (() => void) | undefined; |
1023 | 1026 | const authPromise = new Promise<void>((resolve) => { |
1024 | 1027 | resolveAuth = resolve; |
1025 | 1028 | }); |
@@ -1060,6 +1063,9 @@ describe("runPreparedReply media-only handling", () => {
|
1060 | 1063 | }; |
1061 | 1064 | rotatedRun.updateSessionId("session-after-rotation"); |
1062 | 1065 | |
| 1066 | +if (!resolveAuth) { |
| 1067 | +throw new Error("Expected auth profile resolver to be initialized"); |
| 1068 | +} |
1063 | 1069 | resolveAuth(); |
1064 | 1070 | |
1065 | 1071 | await Promise.resolve(); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。