function getSummary(res) {
  return ['passing', 'pending', 'failing'].reduce((summary, type) => {
    const pattern = new RegExp(`  (\\d+) ${type}\\s`);
    const match = pattern.exec(res.output);
    summary[type] = match ? parseInt(match, 10) : 0;

    return summary;
  }, res);
}
Parses some `mocha` reporter output and returns a summary based on the "epilogue"
@param {string} res - Typically output of STDOUT from the 'spec' reporter
@returns {Summary}