Stacked-Org / stacked

A Flutter application architecture created from real world scenarios
MIT License
957 stars 255 forks source link

CLI only generates test_helpers for NavigationService how about RouterService? #1067

Closed Dionnie123 closed 9 months ago

Dionnie123 commented 9 months ago

Describe the bug

I'm trying to unit test my StartUpViewModel and it gives me an error the type RouterService is not registered inside GetIt which makes sense because the CLI only generated a test_helper for NavigationService and not RouterService

To reproduce

  1. Run basic stacked project
  2. Create a basic ViewModel inject RouterService instead of NavigationService
  3. Unit test the ViewModel, flutter test

Expected behavior

Must pass the ViewModel test

Screenshots

image

Additional Context

I thought there's a command to generate test for service e.g stacked create test router_service but none lol

No response