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
It seems to be unable to mock navigator interactions when code in tests depends on types that are not publicly visible.
It's not uncommon that the Flutter SDK uses internal types that cannot be used outside the sdk. E.g. trying to test that DropdownButton pushes a dropdown menu will throw due to the when method generic type param that cannot be stubbed.
Attempting the above will fail with:
Exception has occurred.
TestFailure (No matching calls. All calls: MockNavigator.canPop(), MockNavigator.push<_DropdownRouteResult<String>>(_DropdownRoute<String>(RouteSettings(none, null), animation: null))
Mock navigator should expose a way of working around internal types (or maybe there already is one that I'm unaware of).
The text was updated successfully, but these errors were encountered:
It seems to be unable to mock navigator interactions when code in tests depends on types that are not publicly visible.
It's not uncommon that the Flutter SDK uses internal types that cannot be used outside the sdk. E.g. trying to test that
DropdownButton
pushes a dropdown menu will throw due to thewhen
method generic type param that cannot be stubbed.Attempting the above will fail with:
Mock navigator should expose a way of working around internal types (or maybe there already is one that I'm unaware of).
The text was updated successfully, but these errors were encountered: