File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change
1
+ import 'dart:async' ;
2
+
1
3
import 'package:mockito/annotations.dart' ;
2
4
import 'package:mockito/mockito.dart' ;
3
5
import 'package:test/test.dart' ;
@@ -92,7 +94,7 @@ void main() {
92
94
when (cat.eatFood (any)).thenReturn (false );
93
95
94
96
// ... or plain arguments themselves
95
- when (cat.eatFood (" fish" )).thenReturn (true );
97
+ when (cat.eatFood (' fish' )).thenReturn (true );
96
98
97
99
// ... including collections
98
100
when (cat.walk (['roof' , 'tree' ])).thenReturn (2 );
@@ -202,7 +204,7 @@ void main() {
202
204
}
203
205
204
206
// Waiting for a call.
205
- chewHelper (cat);
207
+ unawaited ( chewHelper (cat) );
206
208
await untilCalled (cat.chew ()); // This completes when cat.chew() is called.
207
209
208
210
// Waiting for a call that has already happened.
You can’t perform that action at this time.
0 commit comments