Deflake web_fs_test.dart in flutter_tools (#41952)

This commit is contained in:
Jonah Williams
2019-10-03 19:07:38 -07:00
committed by GitHub
parent 6048b62e21
commit db9ad60bfe

View File

@@ -61,7 +61,6 @@ void main() {
)).thenAnswer((Invocation invocation) async {
final String workingDirectory = invocation.namedArguments[#workingDirectory];
fs.file(fs.path.join(workingDirectory, '.packages')).createSync(recursive: true);
fs.file(fs.path.join(workingDirectory, 'pubspec.yaml')).createSync();
return 0;
});
when(mockBuildDaemonClient.buildResults).thenAnswer((Invocation _) {
@@ -81,6 +80,9 @@ void main() {
when(mockBuildDaemonCreator.assetServerPort(any)).thenReturn(4321);
testbed = Testbed(
setup: () {
fs.file(fs.path.join('packages', 'flutter_tools', 'pubspec.yaml'))
..createSync(recursive: true)
..setLastModifiedSync(DateTime(1991, 08, 23));
// Create an empty .packages file so we can read it when we check for
// plugins on WebFs.start()
fs.file('.packages').createSync();