test: fix openclaw test state helper types · openclaw/openclaw@9da76c4
steipete
·
2026-04-28
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -66,7 +66,9 @@ function normalizeLabel(value: string | undefined): string {
|
66 | 66 | return (value ?? "state").replace(/[^A-Za-z0-9_.-]+/gu, "-").replace(/^-+|-+$/gu, "") || "state"; |
67 | 67 | } |
68 | 68 | |
69 | | -function resolveWindowsHomeEnv(home: string): Pick<NodeJS.ProcessEnv, "HOMEDRIVE" | "HOMEPATH"> { |
| 69 | +function resolveWindowsHomeEnv( |
| 70 | +home: string, |
| 71 | +): Partial<Pick<NodeJS.ProcessEnv, "HOMEDRIVE" | "HOMEPATH">> { |
70 | 72 | if (process.platform !== "win32") { |
71 | 73 | return {}; |
72 | 74 | } |
@@ -118,7 +120,7 @@ function resolveLayout(
|
118 | 120 | }; |
119 | 121 | } |
120 | 122 | |
121 | | -function scenarioConfig(options: OpenClawTestStateOptions): unknown | undefined { |
| 123 | +function scenarioConfig(options: OpenClawTestStateOptions): Record<string, unknown> | undefined { |
122 | 124 | const scenario = options.scenario ?? "empty"; |
123 | 125 | if (scenario === "minimal" || scenario === "external-service") { |
124 | 126 | return {}; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。