• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1export default 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 "custom.mjs ";
7  yield JSON.stringify(counters);
8}
9