Deflake AnsiSpinner tests (#27825)

This commit is contained in:
Dan Field
2019-02-12 12:28:45 -08:00
committed by GitHub
parent e711fd9744
commit fdcb861b05
2 changed files with 60 additions and 15 deletions

View File

@@ -6,6 +6,7 @@ import 'dart:async';
import 'package:meta/meta.dart';
import '../base/context.dart';
import 'io.dart';
import 'platform.dart';
import 'terminal.dart';
@@ -464,7 +465,7 @@ abstract class Status {
final VoidCallback onFinish;
@protected
final Stopwatch _stopwatch = Stopwatch();
final Stopwatch _stopwatch = context[Stopwatch] ?? Stopwatch();
@protected
@visibleForTesting