ScenarioRunPackage constructor

ScenarioRunPackage({
  1. required String path,
  2. required String output,
  3. Map<String, String>? axes,
  4. int ms = 0,
  5. List<ScenarioRunOutcome> scenarios = const [],
  6. String? report,
  7. String? log,
  8. String? error,
  9. ScenarioRunDrift? drift,
  10. int? passed,
  11. int? failed,
  12. int? skipped,
  13. int? unsettledCount,
  14. int scenariosElided = 0,
  15. String time = 'fake',
  16. double? animations,
})

Implementation

ScenarioRunPackage({
  required this.path,
  required this.output,
  this.axes,
  this.ms = 0,
  this.scenarios = const [],
  this.report,
  this.log,
  this.error,
  this.drift,
  int? passed,
  int? failed,
  int? skipped,
  int? unsettledCount,
  this.scenariosElided = 0,
  this.time = 'fake',
  this.animations,
}) : passed = passed ?? scenarios.where((s) => s.ok && !s.skipped).length,
     failed = failed ?? scenarios.where((s) => !s.ok).length,
     skipped = skipped ?? scenarios.where((s) => s.skipped).length,
     unsettledCount =
         unsettledCount ??
         scenarios.fold(0, (sum, s) => sum + s.unsettledCount);