(marked: { audits: Audit[]; groups: Group[] })
| 78 | } |
| 79 | |
| 80 | function logSkipped(marked: { audits: Audit[]; groups: Group[] }): void { |
| 81 | const { audits, groups } = marked; |
| 82 | |
| 83 | const formattedCounts = [ |
| 84 | { name: 'audit', items: audits }, |
| 85 | { name: 'group', items: groups }, |
| 86 | ] |
| 87 | .map(({ name, items }) => { |
| 88 | const skipped = items.filter(({ isSkipped }) => isSkipped); |
| 89 | if (skipped.length === 0) { |
| 90 | return ''; |
| 91 | } |
| 92 | return `${skipped.length} out of ${pluralizeToken(name, items.length)}`; |
| 93 | }) |
| 94 | .filter(Boolean) |
| 95 | .join(' and '); |
| 96 | |
| 97 | if (!formattedCounts) { |
| 98 | return; |
| 99 | } |
| 100 | logger.info(formatMetaLog(`Skipping ${formattedCounts}`)); |
| 101 | } |
no test coverage detected