Skip to content

Instantly share code, notes, and snippets.

@mehmetf
Created November 8, 2018 00:38
Show Gist options
  • Save mehmetf/55d2cba22a21d9a45daec237f3e37449 to your computer and use it in GitHub Desktop.
Save mehmetf/55d2cba22a21d9a45daec237f3e37449 to your computer and use it in GitHub Desktop.
A future that never finishes...
import "dart:async";
import "package:flutter_test/flutter_test.dart";
void main() {
Future future;
setUp(() {
future = new Future.value();
});
testWidgets("awaiting future with value from setUp works", (WidgetTester tester) async {
await future;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment