Skip to content

Instantly share code, notes, and snippets.

@gamebox
Created May 1, 2019 22:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gamebox/f8d46e4571b66aa8225bdf46ac9fced0 to your computer and use it in GitHub Desktop.
Save gamebox/f8d46e4571b66aa8225bdf46ac9fced0 to your computer and use it in GitHub Desktop.
import 'dart:async';
import 'package:flutter_test/flutter_test.dart';
void main() async {
LiveTestWidgetsFlutterBinding();
Future outsideFuture;
setUp(() {
outsideFuture = Future.microtask(() {
return 'outside';
});
});
testWidgets("awaiting future with value from setUp works", (t) async {
Future insideFuture = Future.microtask(() {
return 'inside';
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment