stacked
stacked copied to clipboard
Type Safe Navigation does't verify in unit tests
When we use type safe navigation in our code we can't verify in the unit tests that it was used.
final navigationService = getAndRegisterNavigationService();
final model = _getModel(fillFormData: false);
await model.goToServiceAreaSelection();
verify(navigationService.navigateToPermissionPrimerView(
permissionPrimer: PermissionPrimer.location
));
This fails even though the function does this
Future<void> goToServiceAreaSelection() await {
final permissionGranted =
await _navigationService.navigateToPermissionPrimerView(
permissionPrimer: PermissionPrimer.location,
);
}
Requirements
- Determine if it's possible to verify extension function calls
- Based on the research, make adjustments to the Stacked generator