(diagnostics)
| 109 | * compilation, so we deduplicate before reporting. |
| 110 | */ |
| 111 | export function deduplicateDiagnostics(diagnostics) { |
| 112 | const seen = new Set(); |
| 113 | return diagnostics.filter((d) => { |
| 114 | const key = `${d.line}:${d.short}`; |
| 115 | if (seen.has(key)) return false; |
| 116 | seen.add(key); |
| 117 | return true; |
| 118 | }); |
| 119 | } |
| 120 | |
| 121 | /** |
| 122 | * Run the React Compiler over a single file and return the number of |
no test coverage detected