function merge_page_reports(pageReports) {
  function to_site_map(accumulator, { url, violations }) {
    if (accumulator[url]) {
      accumulator[url].violations.push(violations);
    } else {
      accumulator[url] = {
        url,
        violations: [violations],
      };
    }

    return accumulator;
  }

  const map = pageReports.reduce(to_site_map, {});

  return values(map);
}
/**
 * Accumulate test suites that run tests multiple times on the same URL.
 * The subject of the first run should be the entire static page content,
 * the subjects of subsequent runs should be fragments that are only
 * available as a result of user interaction.
 * @param {Array} pageReports
 * @returns {Array}
 */
Accumulate test suites that run tests multiple times on the same URL.
The subject of the first run should be the entire static page content,
the subjects of subsequent runs should be fragments that are only
available as a result of user interaction.
@param {Array} pageReports
@returns {Array}
Accumulate test suites that run tests multiple times on the same URL . The subject of the first run should be the entire static page content the subjects of subsequent runs should be fragments that are only available as a result of user interaction . @param { Array } pageReports @returns { Array }
function merge_page_reports(pageReports) {
  function to_site_map(accumulator, { url, violations }) {
    if (accumulator[url]) {
      accumulator[url].violations.push(violations);
    } else {
      accumulator[url] = {
        url,
        violations: [violations],
      };
    }
    return accumulator;
  }
  const map = pageReports.reduce(to_site_map, {});
  return values(map);
}
function merge_page_reports ( pageReports ) { function to_site_map ( accumulator , { url , violations } ) { if ( accumulator [ url ] ) { accumulator [ url ] . violations . push ( violations ) ; } else { accumulator [ url ] = { url , violations : [ violations ] , } ; } return accumulator ; } const map = pageReports . reduce ( to_site_map , { } ) ; return values ( map ) ; }
Accumulate test suites that run tests multiple times on the same URL.
Accumulate test suites that run tests multiple times on the same URL .