(text: string)
| 3 | import { validate, type ValidationIssue } from "../src/validate"; |
| 4 | |
| 5 | function getIssues(text: string): ValidationIssue[] { |
| 6 | const parsed = parseFrontmatter(text); |
| 7 | if (!parsed) throw new Error("Failed to parse frontmatter"); |
| 8 | return validate(parsed); |
| 9 | } |
| 10 | |
| 11 | function issueFor(issues: ValidationIssue[], field: string): ValidationIssue | undefined { |
| 12 | return issues.find((i) => i.field === field); |
no test coverage detected