Apply mocks to test command to deflake web_fs test (#42118)

This commit is contained in:
Jonah Williams
2019-10-07 15:20:33 -07:00
committed by GitHub
parent ebfe6020b8
commit 9638756c2a

View File

@@ -20,6 +20,7 @@ import 'package:flutter_tools/src/web/compile.dart';
import 'package:mockito/mockito.dart';
import '../../src/common.dart';
import '../../src/mocks.dart';
import '../../src/testbed.dart';
void main() {
@@ -88,7 +89,9 @@ void main() {
}));
test('Builds a web bundle - end to end', () => testbed.run(() async {
final CommandRunner<void> runner = createTestCommandRunner(BuildCommand());
final BuildCommand buildCommand = BuildCommand();
applyMocksToCommand(buildCommand);
final CommandRunner<void> runner = createTestCommandRunner(buildCommand);
final List<String> dependencies = <String>[
fs.path.join('packages', 'flutter_tools', 'lib', 'src', 'build_system', 'targets', 'web.dart'),
fs.path.join('bin', 'cache', 'flutter_web_sdk'),