static assertHeadingKeysExist(headings, items) {
    // If there are no items, there's nothing to check.
    if (!items.length) return;
    // Only do this in tests for now.
    if (!isUnderTest) return;

    for (const heading of headings) {
      // `null` heading key means it's a column for subrows only
      if (heading.key === null) continue;

      const key = heading.key;
      if (items.some(item => key in item)) continue;
      throw new Error(`"${heading.key}" is missing from items`);
    }
  }
This catches typos in the `key` property of a heading definition of table/opportunity details.
Throws an error if any of keys referenced by headings don't exist in at least one of the items.

@param {LH.Audit.Details.Table['headings']|LH.Audit.Details.Opportunity['headings']} headings
@param {LH.Audit.Details.Opportunity['items']|LH.Audit.Details.Table['items']} items