UnitTestTask constructor

UnitTestTask({
  1. required String projectPath,
  2. required ProjectType projectType,
  3. String? testName,
  4. String? testFilePath,
})

Implementation

UnitTestTask({
  required this.projectPath,
  required this.projectType,
  this.testName,
  this.testFilePath,
}) : super(
        projectType == ProjectType.flutter ? 'flutter' : 'dart',
        [
          'test',
          if (testFilePath != null) testFilePath,
          if (testName != null) '--name $testName',
          '--reporter=json',
        ],
        workingDirectory: projectPath,
      );