From 9deddcfa4b6b6c1ecb3111891c20cc46c115569d Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Tue, 25 Jun 2024 08:57:45 -0700 Subject: [PATCH] Fix lint in examples. PiperOrigin-RevId: 646496713 --- example/example.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/example/example.dart b/example/example.dart index 56270cd2..ead196c5 100644 --- a/example/example.dart +++ b/example/example.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:test/test.dart'; @@ -92,7 +94,7 @@ void main() { when(cat.eatFood(any)).thenReturn(false); // ... or plain arguments themselves - when(cat.eatFood("fish")).thenReturn(true); + when(cat.eatFood('fish')).thenReturn(true); // ... including collections when(cat.walk(['roof', 'tree'])).thenReturn(2); @@ -202,7 +204,7 @@ void main() { } // Waiting for a call. - chewHelper(cat); + unawaited(chewHelper(cat)); await untilCalled(cat.chew()); // This completes when cat.chew() is called. // Waiting for a call that has already happened.