How should I test a Future in Dart?
Full example of how to test with the completion matcher is as follows. import ‘package:unittest/unittest.dart’; class Compute { Future<Map> sumIt(List<int> data) { Completer completer = new Completer(); int sum = 0; data.forEach((i) => sum += i); completer.complete({“value” : sum}); return completer.future; } } void main() { test(“testing a future”, () { Compute compute = new … Read more