appTestCommands function
The flutter commands that run tests in an app once their files are
in it: flutter pub add of their dev dependencies, if they have any;
flutter analyze, since the tests follow the rules of the analysis of
the app too; and flutter test, which runs every test of the app.
Implementation
List<List<String>> appTestCommands(List<MatrixAppTest> tests) {
final devDependencies = {for (final test in tests) ...test.devDependencies};
return [
if (devDependencies.isNotEmpty)
['pub', 'add', for (final package in devDependencies) 'dev:$package'],
const ['analyze'],
const ['test'],
];
}