go_router icon indicating copy to clipboard operation
go_router copied to clipboard

Add tests to Redirection Example

Open Lyokone opened this issue 2 years ago • 6 comments

: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 avatar Jan 27 '22 11:01 Lyokone

@Lyokone can you fix the style issue and resubmit? Likely dart format . will solve the problem.

csells avatar Feb 10 '22 21:02 csells

It should be fixed now :)

Lyokone avatar Feb 15 '22 10:02 Lyokone

@chunhtai @Lyokone This PR is something to land after the PR bring go_router to flutter/packages has landed.

csells avatar Feb 19 '22 20:02 csells

I can definitely resubmit this PR to flutter/package if needed 😊

Lyokone avatar Feb 19 '22 20:02 Lyokone

@Lyokone yes please do. we are trying to bring the package into the flutter/package within this week.

chunhtai avatar Feb 22 '22 18:02 chunhtai

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?

chunhtai avatar Feb 25 '22 00:02 chunhtai