Index: utils/tests/pub/version_solver_test.dart |
diff --git a/utils/tests/pub/version_solver_test.dart b/utils/tests/pub/version_solver_test.dart |
index eb37f640d893097449827f1a9fd546d3d2f9777f..3d4b020e2cb07d504ca977f22d10015be2aed937 100644 |
--- a/utils/tests/pub/version_solver_test.dart |
+++ b/utils/tests/pub/version_solver_test.dart |
@@ -465,11 +465,11 @@ class MockSource extends Source { |
: _packages = <String, Map<Version, Package>>{}; |
Future<List<Version>> getVersions(String name, String description) { |
- return fakeAsync(() => _packages[description].keys.toList()); |
+ return defer(() => _packages[description].keys.toList()); |
} |
Future<Pubspec> describe(PackageId id) { |
- return fakeAsync(() { |
+ return defer(() { |
return _packages[id.name][id.version].pubspec; |
}); |
} |
@@ -526,15 +526,6 @@ class MockVersionlessSource extends Source { |
} |
} |
-Future fakeAsync(callback()) { |
- var completer = new Completer(); |
- Timer.run(() { |
- completer.complete(callback()); |
- }); |
- |
- return completer.future; |
-} |
- |
Pair<String, Source> parseSource(String name) { |
var match = new RegExp(r"(.*) from (.*)").firstMatch(name); |
if (match == null) return new Pair<String, Source>(name, source1); |