(name: string, checks: Check[])
| 11 | } |
| 12 | |
| 13 | export function result(name: string, checks: Check[]): GraderResult { |
| 14 | const failures = checks.filter(([passed]) => !passed).map(([, reason]) => reason); |
| 15 | return { |
| 16 | name, kind: "code", passed: failures.length === 0, score: failures.length ? 0 : 1, |
| 17 | evidence: failures.length ? failures.join("; ") : "All required observations were verified.", |
| 18 | }; |
| 19 | } |