Dont depend on web SDK unless running tests on chrome (#34457)

This commit is contained in:
Jonah Williams
2019-06-13 17:51:36 -07:00
committed by GitHub
parent ea6b758720
commit f68bc1beb2

View File

@@ -21,6 +21,7 @@ import '../test/coverage_collector.dart';
import '../test/event_printer.dart';
import '../test/runner.dart';
import '../test/watcher.dart';
class TestCommand extends FastFlutterCommand {
TestCommand({ bool verboseHelp = false }) {
requiresPubspecYaml();
@@ -108,10 +109,15 @@ class TestCommand extends FastFlutterCommand {
}
@override
Future<Set<DevelopmentArtifact>> get requiredArtifacts async => <DevelopmentArtifact>{
DevelopmentArtifact.universal,
DevelopmentArtifact.web,
};
Future<Set<DevelopmentArtifact>> get requiredArtifacts async {
final Set<DevelopmentArtifact> results = <DevelopmentArtifact>{
DevelopmentArtifact.universal,
};
if (argResults['platform'] == 'chrome') {
results.add(DevelopmentArtifact.web);
}
return results;
}
@override
String get name => 'test';