TestRunCommand constructor
TestRunCommand({
- required PubspecYaml pubspecYaml,
- required Bindings bindings,
- required PubspecLock pubspecLock,
- required FindFile findFile,
- required FileSystem fs,
- required Logger logger,
Implementation
TestRunCommand({
required this.pubspecYaml,
required this.bindings,
required this.pubspecLock,
required this.findFile,
required this.fs,
required this.logger,
}) : argParser = ArgParser(usageLineLength: 120) {
addTestFlags(this);
argParser.addSeparator(cyan.wrap('SIP Flags:')!);
argParser
..addFlag(
'recursive',
abbr: 'r',
help: 'Run tests in subdirectories',
negatable: false,
)
..addFlag(
'concurrent',
abbr: 'c',
aliases: ['parallel'],
help: 'Run tests concurrently',
negatable: false,
)
..addFlag(
'bail',
abbr: 'b',
help: 'Bail after first test failure',
negatable: false,
)
..addFlag(
'clean',
help: 'Whether to remove the optimized test files after running tests',
defaultsTo: true,
)
..addFlag(
'dart-only',
help: 'Run only dart tests',
negatable: false,
)
..addFlag(
'flutter-only',
help: 'Run only flutter tests',
negatable: false,
)
..addFlag(
'optimize',
help: 'Whether to create optimized test files (Dart only)',
defaultsTo: true,
);
}