My StateNotifier Test Fails Unexpectedly #3919
Unanswered
maherelamary
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Testing My StateNotifier Provider Success State Fails
We test that the StateNotifierProvider listener changed from AsyncLoading to AsyncData, but the test finished before it reach this state, awaiting for Duration solves the issue.
this issue happens when StateNotifier's constructor calling method, which updates the state and notify listeners.
Could you explain why this happening?. Do u recommend refactor provider to be AsyncNotifier ?.
Here's my provider...
Here's my test file ...
* It seems that the test was finished, before the provider state updated?!!
Beta Was this translation helpful? Give feedback.
All reactions