mockito
mockito copied to clipboard
Mockito-inspired mock library for Dart
I initially thought that `verify(something).called(0)` would be equivalent to `verifyNever`. Instead the first fails with a `no matching calls` error. I am not sure if this is a bug or...
I am unsure to what version to bump this, as it technically changes the API by adding types to `reset` and `clearInteractions`. --- - [x] I’ve reviewed the contributor guide...
```console Bad state: Asset URI is missing for abstract class JSObject package:mockito/src/builder.dart 2200:10 _MockClassInfo._typeImport package:mockito/src/builder.dart 1676:21 _MockClassInfo._addFakeClass... package:code_builder/src/specs/type_reference.g.dart 164:33 _$TypeReferenceBuilder.update package:code_builder/src/specs/type_reference.g.dart 22:36 new _$TypeReference package:mockito/src/builder.dart 1673:33 _MockClassInfo._addFakeClass.. package:mockito/src/builder.dart 2075:24 _MockClassInfo._withTypeParameters...
running `flutter test --platform chrome` (or `flutter test`) is giving the below issue: ``` flutter test --platform chrome ../../../.pub-cache/hosted/pub.dev/mockito-5.4.4/lib/src/invocation_matcher.dart:155:32: Error: The class 'DeepCollectionEquality' can't be extended outside of its library...
It is impossible to use the library if an extension type contains generics. For extension types without generics, it works fine (at the master branch only). - pubspec.yaml ```yml dev_dependencies:...
Topics help users on pub.dev discover packages and related packages. You can see a list of [topics here](https://pub.dev/topics). You can also make your own topics. Topics are added to pubspec.yaml...
I want to test method1 to verify that its retry functionality works correctly. In my system, the only way to trigger the retry is by invoking failure.onRetry(). Could you help...
Mockito [assumes](https://github.com/dart-lang/mockito/blob/2259e105b335b7a4b3a4df313ce4099e8a92a959/lib/src/builder.dart#L1874) that the import uri is where an constant's type is defined, which isn't always true. This may not cause problems today, but it breaks when trying to revive...
Hey guys! I noticed an unexpected behavior in a project. Normally, we use ‘verify’ on mocked classes to verify the call. If you use an unmocked class, you get an...
With `dart:js_interop`, mocking needs to be done at the JS level due to the use of extension types. For example: ```dart extension type Window._(JSObject _) implements JSObject { external String...