Commit 7a0f3d34 authored by Ian Hickson's avatar Ian Hickson Committed by GitHub

Remove a sketchy override of a field (#6009)

The way this was implemented is sketchy, especially in strong mode.
parent 2dc26ba9
...@@ -36,16 +36,7 @@ class TestCommand extends FlutterCommand { ...@@ -36,16 +36,7 @@ class TestCommand extends FlutterCommand {
defaultsTo: 'coverage/lcov.info', defaultsTo: 'coverage/lcov.info',
help: 'Where to store coverage information (if coverage is enabled).' help: 'Where to store coverage information (if coverage is enabled).'
); );
} commandValidator = () {
@override
String get name => 'test';
@override
String get description => 'Run Flutter unit tests for the current project.';
@override
Validator commandValidator = () {
if (!FileSystemEntity.isFileSync('pubspec.yaml')) { if (!FileSystemEntity.isFileSync('pubspec.yaml')) {
printError( printError(
'Error: No pubspec.yaml file found in the current working directory.\n' 'Error: No pubspec.yaml file found in the current working directory.\n'
...@@ -56,6 +47,13 @@ class TestCommand extends FlutterCommand { ...@@ -56,6 +47,13 @@ class TestCommand extends FlutterCommand {
} }
return true; return true;
}; };
}
@override
String get name => 'test';
@override
String get description => 'Run Flutter unit tests for the current project.';
Iterable<String> _findTests(Directory directory) { Iterable<String> _findTests(Directory directory) {
return directory.listSync(recursive: true, followLinks: false) return directory.listSync(recursive: true, followLinks: false)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment