(
srcPath: string,
subCompFiles?: Record<string, string>,
)
| 63 | // (or a custom srcPath) and return the missing_or_empty_sub_composition |
| 64 | // finding, if any, plus the raw lint result for callers that need totalErrors. |
| 65 | async function lintSubComp( |
| 66 | srcPath: string, |
| 67 | subCompFiles?: Record<string, string>, |
| 68 | ): Promise<{ finding: HyperframeLintFinding | undefined; totalErrors: number }> { |
| 69 | const project = makeProject(htmlWithSubComp(srcPath), subCompFiles); |
| 70 | const { totalErrors, results } = await lintProject(project); |
| 71 | const finding = results |
| 72 | .flatMap((r) => r.result.findings) |
| 73 | .find((f) => f.code === "missing_or_empty_sub_composition"); |
| 74 | return { finding, totalErrors }; |
| 75 | } |
| 76 | |
| 77 | it.each([ |
| 78 | { |
no test coverage detected