Commit 19c75505 authored by Dan Field's avatar Dan Field Committed by Flutter GitHub Bot

fix mockStopWatch creation (#48098)

parent 80ee2ff0
...@@ -78,7 +78,6 @@ void main() { ...@@ -78,7 +78,6 @@ void main() {
final RegExp secondDigits = RegExp(r'[0-9,.]*[0-9]m?s'); final RegExp secondDigits = RegExp(r'[0-9,.]*[0-9]m?s');
AnsiStatus _createAnsiStatus() { AnsiStatus _createAnsiStatus() {
mockStopwatch = FakeStopwatch();
return AnsiStatus( return AnsiStatus(
message: 'Hello world', message: 'Hello world',
timeout: const Duration(seconds: 2), timeout: const Duration(seconds: 2),
...@@ -88,6 +87,7 @@ void main() { ...@@ -88,6 +87,7 @@ void main() {
} }
setUp(() { setUp(() {
mockStopwatch = FakeStopwatch();
mockStdio = MockStdio(); mockStdio = MockStdio();
called = 0; called = 0;
}); });
...@@ -199,6 +199,7 @@ void main() { ...@@ -199,6 +199,7 @@ void main() {
testUsingContext('Stdout startProgress on colored terminal pauses on $testOs', () async { testUsingContext('Stdout startProgress on colored terminal pauses on $testOs', () async {
bool done = false; bool done = false;
FakeAsync().run((FakeAsync time) { FakeAsync().run((FakeAsync time) {
mockStopwatch.elapsed = const Duration(seconds: 5);
final Logger logger = context.get<Logger>(); final Logger logger = context.get<Logger>();
final Status status = logger.startProgress( final Status status = logger.startProgress(
'Knock Knock, Who\'s There', 'Knock Knock, Who\'s There',
......
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