runTests method
Future<TestResult>
runTests(
- PackageData packageData, {
- required Directory coverageOutputDirectory,
- required bool showTestOutput,
override
Implementation
@override
Future<TestResult> runTests(
PackageData packageData, {
required Directory coverageOutputDirectory,
required bool showTestOutput,
}) async {
final coverageOutputFilePath =
'${coverageOutputDirectory.absolute.path}${path.separator}lcov.info';
final exitCode = await processRunner.run(
'flutter',
['test', '--coverage', '--coverage-path=$coverageOutputFilePath'],
workingDirectory: packageData.directory,
showOutput: showTestOutput,
);
final hitmap = _parseTestCoverage(coverageOutputFilePath);
return TestResult(hitmap: hitmap, exitCode: exitCode);
}