test: signal plugin warning text · openclaw/openclaw@9456cc8
shakkernerd
·
2026-05-13
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1158,7 +1158,7 @@ describe("installPluginFromNpmSpec", () => {
|
1158 | 1158 | return; |
1159 | 1159 | } |
1160 | 1160 | expect(result.pluginId).toBe(pluginId); |
1161 | | -expect(warnings.some((warning) => warning.includes("installation blocked"))).toBe(false); |
| 1161 | +expect(warnings.join("\n")).not.toContain("installation blocked"); |
1162 | 1162 | expectNpmInstallIntoRoot({ |
1163 | 1163 | calls: runCommandWithTimeoutMock.mock.calls, |
1164 | 1164 | npmRoot, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -309,11 +309,11 @@ function expectFailedInstallResult<
|
309 | 309 | } |
310 | 310 | |
311 | 311 | function expectWarningIncludes(warnings: readonly string[], fragment: string) { |
312 | | -expect(warnings.some((warning) => warning.includes(fragment))).toBe(true); |
| 312 | +expect(warnings.join("\n")).toContain(fragment); |
313 | 313 | } |
314 | 314 | |
315 | 315 | function expectWarningExcludes(warnings: readonly string[], fragment: string) { |
316 | | -expect(warnings.some((warning) => warning.includes(fragment))).toBe(false); |
| 316 | +expect(warnings.join("\n")).not.toContain(fragment); |
317 | 317 | } |
318 | 318 | |
319 | 319 | function requireRecord(value: unknown, label: string): Record<string, unknown> { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -119,14 +119,14 @@ function expectRegistryDiagnosticContains(
|
119 | 119 | registry: ReturnType<typeof loadPluginManifestRegistry>, |
120 | 120 | fragment: string, |
121 | 121 | ) { |
122 | | -expect(registry.diagnostics.some((diag) => diag.message.includes(fragment))).toBe(true); |
| 122 | +expect(registry.diagnostics.map((diag) => diag.message).join("\n")).toContain(fragment); |
123 | 123 | } |
124 | 124 | |
125 | 125 | function expectNoRegistryDiagnosticContains( |
126 | 126 | registry: ReturnType<typeof loadPluginManifestRegistry>, |
127 | 127 | fragment: string, |
128 | 128 | ) { |
129 | | -expect(registry.diagnostics.some((diag) => diag.message.includes(fragment))).toBe(false); |
| 129 | +expect(registry.diagnostics.map((diag) => diag.message).join("\n")).not.toContain(fragment); |
130 | 130 | } |
131 | 131 | |
132 | 132 | function requireRecord(value: unknown, label: string): Record<string, unknown> { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。