Repository: flutter
Issue: LiveTestWidgetsFlutterBinding throws an assertion error after the test when there are async exceptions
Labels: a: tests,framework,a: error message,has reproducible steps,P2,found in release: 2.3,team-framework,triaged-framework


## Steps to Reproduce

```dart
import 'package:flutter_test/flutter_test.dart';

void main() {
  LiveTestWidgetsFlutterBinding();
  testWidgets('foo', (tester) async {
    Future.error('some async error');
  });
}
```

The following assertion error is thrown:

```
<... stack trace here from the async exception>

══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following assertion was thrown running a test (but after the test had completed):
'package:flutter_test/src/binding.dart': Failed assertion: line 1561 pos 12: 'inTest': is not true.

When the exception was thrown, this was the stack:
#2      LiveTestWidgetsFlutterBinding.pump (package:flutter_test/src/binding.dart:1561:12)
#3      TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:801:13)
<asynchronous suspension>
(elided 2 frames from class _AssertionError)
...
════════════════════════════════════════════════════════════════════════════════════════════════════
00:05 +0 -1: Some tests failed.
```

This does not happen with `AutomatedTestWidgetsFlutterBinding`. The cause of this is https://github.com/dart-lang/test/issues/1512. 

<details>
  <summary>Doctor output</summary>
<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
[✓] Flutter (Channel unknown, 2.3.0-1.0.pre.144, on Mac OS X 10.15.7 19H524 darwin-x64, locale en-US)
    • Flutter version 2.3.0-1.0.pre.144 at /Users/jiahaog/dev/flutter
    • Upstream repository unknown
    • Framework revision 9eb93e3485 (2 days ago), 2021-04-28 04:49:01 -0400
    • Engine revision 5b55f3ccb4
    • Dart version 2.14.0 (build 2.14.0-48.0.dev)

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/jiahaog/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android Studio with Blaze.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode_12.3.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.10.0

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio
    • Android Studio at /Applications/Android Studio with Blaze.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)

[✓] IntelliJ IDEA Community Edition (version 2020.2.2)
    • IntelliJ at /Applications/IntelliJ CE (stable).app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin version 202.8443

[✓] IntelliJ IDEA Ultimate Edition (version 2020.2.2)
    • IntelliJ at /Applications/IntelliJ UE (stable).app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin version 202.8443

[✓] VS Code (version 1.55.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.21.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • Mac OS X 10.15.7 19H524 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 90.0.4430.93

! Doctor found issues in 1 category.
```

</details>