Skip to content
Prev Previous commit
Next Next commit
test: Update the tests
  • Loading branch information
ValentinVignal committed Apr 10, 2024
commit 28c4da1b5cd815cd8745da45883af7278f4855fe
14 changes: 7 additions & 7 deletions packages/go_router/test/on_exit_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void main() {
path: '1',
builder: (BuildContext context, GoRouterState state) =>
DummyScreen(key: page1),
onExit: (BuildContext context) {
onExit: (BuildContext context, GoRouterState state) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a new test that assert the properties in state, to make sure the state is accurate with the route?

return allow;
},
)
Expand Down Expand Up @@ -61,7 +61,7 @@ void main() {
path: '/1',
builder: (BuildContext context, GoRouterState state) =>
DummyScreen(key: page1),
onExit: (BuildContext context) {
onExit: (BuildContext context, GoRouterState state) {
return allow;
},
)
Expand Down Expand Up @@ -95,7 +95,7 @@ void main() {
path: '1',
builder: (BuildContext context, GoRouterState state) =>
DummyScreen(key: page1),
onExit: (BuildContext context) async {
onExit: (BuildContext context, GoRouterState state) async {
return allow.future;
},
)
Expand Down Expand Up @@ -139,7 +139,7 @@ void main() {
path: '/1',
builder: (BuildContext context, GoRouterState state) =>
DummyScreen(key: page1),
onExit: (BuildContext context) async {
onExit: (BuildContext context, GoRouterState state) async {
return allow.future;
},
)
Expand Down Expand Up @@ -176,7 +176,7 @@ void main() {
path: '/',
builder: (BuildContext context, GoRouterState state) =>
DummyScreen(key: home),
onExit: (BuildContext context) {
onExit: (BuildContext context, GoRouterState state) {
return allow;
},
),
Expand All @@ -201,7 +201,7 @@ void main() {
path: '/',
builder: (BuildContext context, GoRouterState state) =>
DummyScreen(key: home),
onExit: (BuildContext context) async {
onExit: (BuildContext context, GoRouterState state) async {
return allow;
},
),
Expand All @@ -227,7 +227,7 @@ void main() {
path: '/',
builder: (BuildContext context, GoRouterState state) =>
DummyScreen(key: home),
onExit: (BuildContext context) {
onExit: (BuildContext context, GoRouterState state) {
return allow;
},
),
Expand Down