test: clarify channel config schema issue assertions

This commit is contained in:
Peter Steinberger
2026-05-08 08:23:02 +01:00
parent 6a20bbd166
commit d22dccdf93
2 changed files with 2 additions and 2 deletions

View File

@@ -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);
}
}

View File

@@ -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);
}
}