const React = require('react'); function Ignores({ metrics, metricsToShow }) { const metricKeys = Object.keys(metricsToShow); const result = []; for (let i = 0; i < metricKeys.length; i++) { const metricKey = metricKeys[i]; if (metricsToShow[metricKey]) { const skipped = metrics[metricKey].skipped; if (skipped > 0) { result.push( `${skipped} ${metricKey}${ skipped === 1 ? '' : metricKey === 'branch' ? 'es' : 's' }` ); } } } if (result.length === 0) { return false; } return (
{result.join(', ')} Ignored
); } function StatusMetric({ data, name }) { return (
{data.pct}%{' '} {name}{' '} {data.covered}/{data.total}
); } module.exports = function SummaryHeader({ metrics, metricsToShow }) { return (
{metricsToShow.statements && ( )} {metricsToShow.branches && ( )} {metricsToShow.functions && ( )} {metricsToShow.lines && ( )}
); };