From 19c7550540d41eb9f287d48a940a761a911ecf73 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Mon, 6 Jan 2020 11:03:01 -0800 Subject: [PATCH] fix mockStopWatch creation (#48098) --- .../flutter_tools/test/general.shard/base/logger_test.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/flutter_tools/test/general.shard/base/logger_test.dart b/packages/flutter_tools/test/general.shard/base/logger_test.dart index 9bff5e1684..e9caf386d3 100644 --- a/packages/flutter_tools/test/general.shard/base/logger_test.dart +++ b/packages/flutter_tools/test/general.shard/base/logger_test.dart @@ -78,7 +78,6 @@ void main() { final RegExp secondDigits = RegExp(r'[0-9,.]*[0-9]m?s'); AnsiStatus _createAnsiStatus() { - mockStopwatch = FakeStopwatch(); return AnsiStatus( message: 'Hello world', timeout: const Duration(seconds: 2), @@ -88,6 +87,7 @@ void main() { } setUp(() { + mockStopwatch = FakeStopwatch(); mockStdio = MockStdio(); called = 0; }); @@ -199,6 +199,7 @@ void main() { testUsingContext('Stdout startProgress on colored terminal pauses on $testOs', () async { bool done = false; FakeAsync().run((FakeAsync time) { + mockStopwatch.elapsed = const Duration(seconds: 5); final Logger logger = context.get(); final Status status = logger.startProgress( 'Knock Knock, Who\'s There',