Unverified Commit 0cd8cef8 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

require awaiting Testbed.run (#43952)

parent 8d5caf3d
......@@ -77,7 +77,7 @@ void main() {
test('Doesnt throw a StateError if Timer is left cleaned up', () async {
final Testbed testbed = Testbed();
testbed.run(() async {
await testbed.run(() async {
final Timer timer = Timer.periodic(const Duration(seconds: 1), (Timer timer) { });
timer.cancel();
});
......
......@@ -90,7 +90,7 @@ class Testbed {
///
/// `overrides` may be used to provide new context values for the single test
/// case or override any context values from the setup.
FutureOr<T> run<T>(FutureOr<T> Function() test, {Map<Type, Generator> overrides}) {
Future<T> run<T>(FutureOr<T> Function() test, {Map<Type, Generator> overrides}) {
final Map<Type, Generator> testOverrides = <Type, Generator>{
..._testbedDefaults,
// Add the initial setUp overrides
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment