diff --git a/test/with_test_environment_test.dart b/test/with_test_environment_test.dart index 6f484af820d491f6ad0f4666ff5e8c568aeeb5e1..ae35c206de5aa4d45fb81689a41a0f6b8000516b 100644 --- a/test/with_test_environment_test.dart +++ b/test/with_test_environment_test.dart @@ -22,19 +22,13 @@ class TestConfiguration extends SimpleConfiguration { Future get done => _completer.future; onDone(success) { - new Future.sync(() { - super.onDone(success); - }).then((_) => _completer.complete(_)) - .catchError((error, stack) => _completer.completeError(error, stack)); + new Future.sync(() => super.onDone(success)) + .then(_completer.complete) + .catchError(_completer.completeError); } bool checkIfTestRan(String testName) { - for (final t in _results) { - if (t.description == testName) { - return true; - } - } - return false; + return _results.any((test) => test.description == testName); } }