(
srcPath: string,
subCompFiles?: Record<string, string>,
)
| 1051 | // (or a custom srcPath) and return the missing_or_empty_sub_composition |
| 1052 | // finding, if any, plus the raw lint result for callers that need totalErrors. |
| 1053 | async function lintSubComp( |
| 1054 | srcPath: string, |
| 1055 | subCompFiles?: Record<string, string>, |
| 1056 | ): Promise<{ finding: HyperframeLintFinding | undefined; totalErrors: number }> { |
| 1057 | const project = makeProject(htmlWithSubComp(srcPath), subCompFiles); |
| 1058 | const { totalErrors, results } = await lintProject(project); |
| 1059 | const finding = results |
| 1060 | .flatMap((r) => r.result.findings) |
| 1061 | .find((f) => f.code === "missing_or_empty_sub_composition"); |
| 1062 | return { finding, totalErrors }; |
| 1063 | } |
| 1064 | |
| 1065 | it.each([ |
| 1066 | { |
no test coverage detected