mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 06:40:42 +00:00
test: clarify channel config schema issue assertions
This commit is contained in:
@@ -7,7 +7,7 @@ function expectSchemaIssue(
|
||||
) {
|
||||
expect(result.success).toBe(false);
|
||||
if (!result.success) {
|
||||
expect(result.error.issues.some((issue) => issue.path.join(".") === issuePath)).toBe(true);
|
||||
expect(result.error.issues.map((issue) => issue.path.join("."))).toContain(issuePath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ function expectSlackConfigIssue(config: unknown, path: string) {
|
||||
const res = SlackConfigSchema.safeParse(config);
|
||||
expect(res.success).toBe(false);
|
||||
if (!res.success) {
|
||||
expect(res.error.issues.some((issue) => issue.path.join(".").includes(path))).toBe(true);
|
||||
expect(res.error.issues.map((issue) => issue.path.join("."))).toContain(path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user