test: clarify channel config schema issue assertions · openclaw/openclaw@d22dccd
steipete
·
2026-05-08
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -7,7 +7,7 @@ function expectSchemaIssue(
|
7 | 7 | ) { |
8 | 8 | expect(result.success).toBe(false); |
9 | 9 | if (!result.success) { |
10 | | -expect(result.error.issues.some((issue) => issue.path.join(".") === issuePath)).toBe(true); |
| 10 | +expect(result.error.issues.map((issue) => issue.path.join("."))).toContain(issuePath); |
11 | 11 | } |
12 | 12 | } |
13 | 13 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -10,7 +10,7 @@ function expectSlackConfigIssue(config: unknown, path: string) {
|
10 | 10 | const res = SlackConfigSchema.safeParse(config); |
11 | 11 | expect(res.success).toBe(false); |
12 | 12 | if (!res.success) { |
13 | | -expect(res.error.issues.some((issue) => issue.path.join(".").includes(path))).toBe(true); |
| 13 | +expect(res.error.issues.map((issue) => issue.path.join("."))).toContain(path); |
14 | 14 | } |
15 | 15 | } |
16 | 16 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。