function getAllAssertionResults(options, lhrs) {
  const groupedByURL = _.groupBy(lhrs, lhr => lhr.finalUrl);

  /** @type {LHCI.AssertCommand.BaseOptions[]} */
  let arrayOfOptions = [options];
  if (options.assertMatrix) {
    if (options.assertions || options.preset || options.budgetsFile || options.aggregationMethod) {
      throw new Error('Cannot use assertMatrix with other options');
    }

    arrayOfOptions = options.assertMatrix;
  }

  /** @type {LHCI.AssertResults.AssertionResult[]} */
  const results = [];
  for (const lhrSet of groupedByURL) {
    for (const baseOptions of arrayOfOptions) {
      results.push(...getAllAssertionResultsForUrl(baseOptions, lhrSet));
    }
  }

  if (options.includePassedAssertions) return results;
  return results.filter(result => !result.passed);
}
Computes all assertion results for the given LHR-set and options.

@param {LHCI.AssertCommand.Options} options
@param {LH.Result[]} lhrs
@return {LHCI.AssertResults.AssertionResult[]}