* Collapse esm/cjs variants of a test name so the same test failing in both module formats dedupes * to a single issue instead of one per variant: * * "... > esm/cjs > esm > should send messages" -> "... > esm/cjs > should send messages" * "... > esm/cjs > cjs > should send messages" -> "...
(name)
| 42 | * "... > esm/cjs > cjs > should send messages" -> "... > esm/cjs > should send messages" |
| 43 | */ |
| 44 | function normalizeTestName(name) { |
| 45 | return name |
| 46 | .replace(/esm\/cjs\s*>\s*(?:esm|cjs)\b/gi, 'esm/cjs') |
| 47 | .replace(/\s+/g, ' ') |
| 48 | .trim(); |
| 49 | } |
| 50 | |
| 51 | function applyVars(text, vars) { |
| 52 | let result = text; |