process method

Report process(
  1. List<Map<String, dynamic>> events
)

Generates a Report from a list of json events from the json reporter.

events cannot be empty and the first event must have type == start and a present protocolVersion. The appropriate processor will be used based on protocolVersion Currently supported protocolVersions: ^0.1.0

Implementation

Report process(List<Map<String, dynamic>> events) {
  assert(events.isNotEmpty, 'Event list cannot be empty');
  if (events.first['type'] != 'start') {
    throw UnsupportedError("First event was not a 'start' event");
  }
  final processorDelegate = _createProcessorDelegate(
    protocolVersion: events.first['protocolVersion'] as String,
  );
  return processorDelegate.process(events);
}