Make AppContext API not be prone to Future oddities (#16034)

Follow-up comments to #15984
This commit is contained in:
Todd Volkert
2018-03-28 15:17:29 -07:00
committed by GitHub
parent bffae21571
commit f8058d7fb2
9 changed files with 45 additions and 45 deletions

View File

@@ -59,7 +59,7 @@ void testUsingContext(String description, dynamic testMethod(), {
test(description, () async {
await runInContext<dynamic>(() {
return context.run<Future<dynamic>>(
return context.run<dynamic>(
name: 'mocks',
overrides: <Type, Generator>{
Config: () => buildConfig(fs),
@@ -84,7 +84,7 @@ void testUsingContext(String description, dynamic testMethod(), {
return runZoned(() {
try {
return context.run<Future<dynamic>>(
return context.run<dynamic>(
// Apply the overrides to the test context in the zone since their
// instantiation may reference items already stored on the context.
overrides: overrides,