Fixes resident_web_runner_test initialize the mock correctly (#90546)

This commit is contained in:
chunhtai 2021-09-22 12:58:21 -07:00 committed by GitHub
parent a921c1cf3d
commit 8d7068694b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -279,11 +279,11 @@ void main() {
// Regression test for https://github.com/flutter/flutter/issues/60613
testUsingContext('ResidentWebRunner calls appFailedToStart if initial compilation fails', () async {
fakeVmServiceHost = FakeVmServiceHost(requests: kAttachExpectations.toList());
_setupMocks();
final ResidentRunner residentWebRunner = setUpResidentRunner(flutterDevice);
fileSystem.file(globals.fs.path.join('lib', 'main.dart'))
.createSync(recursive: true);
fakeVmServiceHost = FakeVmServiceHost(requests: kAttachExpectations.toList());
webDevFS.report = UpdateFSReport(success: false, syncedBytes: 0);
expect(await residentWebRunner.run(), 1);