go_router
go_router copied to clipboard
Add tests to Redirection Example
:sparkles: What kind of change does this PR introduce? (Bug fix, feature, docs update...)
Add tests to Redirection Example and Mockito for creating a MockGoRouter
:arrow_heading_down: What is the current behavior?
No tests
:new: What is the new behavior (if this is a feature change)?
Test the redirection example
:boom: Does this PR introduce a breaking change?
No
:bug: Recommendations for testing
Run in example folder
flutter test --no-pub --coverage --test-randomize-ordering-seed random
To generate coverage. You can use LCOV to see the coverage of the example app.
The redirection.dart
is at 95.8% of Coverage with this PR.
:memo: Links to relevant issues/docs
Not sure if I should update changelog since it's only testing the examples.
:thinking: Checklist before submitting
- [X] I made sure all projects build.
- [X] I updated CHANGELOG.md to add a description of the change.
- [X] I updated the relevant documentation.
- [X] I updated the relevant code example.
- [X] I rebased onto current
master
.
@Lyokone can you fix the style issue and resubmit? Likely dart format .
will solve the problem.
It should be fixed now :)
@chunhtai @Lyokone This PR is something to land after the PR bring go_router to flutter/packages has landed.
I can definitely resubmit this PR to flutter/package if needed 😊
@Lyokone yes please do. we are trying to bring the package into the flutter/package within this week.
this package has been moved to https://github.com/flutter/packages/tree/main/packages/go_router
Can you create a pull request against the flutter/packages instead?