You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Using thenThrow and closure in expect to test throwing will break verify method.
Only the first mock function - verify(() => http.get(any())).called(1); in this case - is verified.
Expected behavior verify(() => http.post(any())).called(1); should passed.
Logs
No matching calls. All calls: MockHttpClient.get(https://example.com/path, {headers: null})
(If you called `verify(...).called(0);`, please instead use `verifyNever(...);`.)
The text was updated successfully, but these errors were encountered:
choi88andys
changed the title
Calling FirebaseMessaging getToken break verify method
Using [thenThrow] and closure in [expect] break [verify] method
Jul 19, 2024
Describe the bug
Using
thenThrow
and closure inexpect
to test throwing will breakverify
method.Only the first mock function -
verify(() => http.get(any())).called(1);
in this case - is verified.To Reproduce
Run below test
Code
Expected behavior
verify(() => http.post(any())).called(1);
should passed.Logs
Additional context
Dart: 3.4.3
Flutter: 3.22.2
mocktail: 1.0.4
http: 1.2.2
The text was updated successfully, but these errors were encountered: