run method

  1. @override
Future<bool> run()
override

Runs this command.

The return value is wrapped in a Future if necessary and returned by CommandRunner.runCommand.

Implementation

@override
Future<bool> run() async {
  final bLogger = logger.collapsibleBlock("🤖 Processing Test");
  final targets = Queue<String>.from(
      await Utils.findFiles(matcher: RegExps.filePubSpecYaml).toList().then(
          (files) => files
              .where((e) =>
                  e.parent.path.endsWith('shared') ||
                  e.parent.parent.path.endsWith('lambdas'))
              .map((e) => e.parent.path)
              .toList()));
  useSequence(targets.map((e) => DartTestTask(this, bLogger)).toList());
  final result = await runSequenceSame((taskName) {
    return {
      'style': style,
      'target': targets.removeLast(),
      'coverage': coverage,
      'indent': '   '
    };
  });

  bLogger.footer('Test');
  return result;
}