Hi,
I greatly appreciate the work that you are doing for the fluttter community. Especially since the null-safety and creating a better tool than mockito.
I ran into the following issue when porting from mockito to mocktail, whereas mockito somehow skipped non-mocked methods because of being null.
I received this error:
Throws type 'Null' is not a subtype of type 'Future<void>'
Now it took me a while to figure out what was happening, so maybe you could add a small paragraph explaining what to do when hitting this error when porting your mockito code to mocktail.
Eg. something like this:
When you receive the following error:
Throws type 'Null' is not a subtype of type 'SomeType'
This error means you need to add a when(() => mock.missingMockMethod()).thenAnswer((_) => yourAnswer) on that particular method of your mock you are using, since mockito kindly skipped this for you because it was null in the pre-null-safety era.
Hi,
I greatly appreciate the work that you are doing for the fluttter community. Especially since the null-safety and creating a better tool than mockito.
I ran into the following issue when porting from mockito to mocktail, whereas mockito somehow skipped non-mocked methods because of being null.
I received this error:
Now it took me a while to figure out what was happening, so maybe you could add a small paragraph explaining what to do when hitting this error when porting your mockito code to mocktail.
Eg. something like this:
When you receive the following error:
This error means you need to add a
when(() => mock.missingMockMethod()).thenAnswer((_) => yourAnswer)on that particular method of your mock you are using, since mockito kindly skipped this for you because it wasnullin the pre-null-safety era.