• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1module.exports = async function * customReporter(source) {
2  const counters = {};
3  for await (const event of source) {
4    counters[event.type] = (counters[event.type] ?? 0) + 1;
5  }
6  yield "package: reporter-cjs";
7  yield JSON.stringify(counters);
8};
9