mocktail
mocktail copied to clipboard
A mock library for Dart inspired by mockito
I have this kind of code ```dart void main() { runApp(Provider( create: (_) => Repo(), child: MyApp(), )); } class MyApp extends StatefulWidget { @override State createState() => _MyAppState(); }...
1. I have a library, which use a 3rd party class. The 3rd party library is used by users directly together with my library. Below is the source code in...
**Is your feature request related to a problem? Please describe.** I think there are people who migrate to `mocktail` from `mockito` after migrating their app to null safety. I think...
## Status **READY** ## Breaking Changes NO ## Description - Updates to Flutter 3.3.1 and Dart 2.18.0 - Uses very_good_analysis - Adds dependabot Regarding very_good_analysis, I disabled two rules that...
Hi, The following error gets thrown and thenAnswer part never gets called: type 'Null' is not a subtype of type 'Future' That's how I mock my use cases: ``` class...
@felangel might be worth adding a note to Mocktail's Readme to warn people about this rather nasty Dart debugger bug when trying to set breakpoints as it seems to affect...
I'm testing a class that receives a VoidCallback in its constructor, which is going to be called after submitting a text field. ``` dart class MyViewModel with ChangeNotifier { VoidCallback?...
**Description** As a user I would like to get a warning whenever a fallback value has been registered but has never been used. ```dart void main() { setUpAll(() { registerFallbackValue(Foo());...
**Describe the bug** Unable to mock and/or verify functions which take in function/callback as an argument **Reproducible Code** ``` import 'package:flutter_test/flutter_test.dart'; import 'package:mocktail/mocktail.dart'; class MockMockableClass extends Mock implements MockableClass {}...
Sometime i want to mock global method and void method so that i can bypass or skip it.