@@ -35,6 +35,8 @@ void main() {
3535
3636 route = await ModularTracker .findRoute ('/product/test' ) as CustomRoute ? ;
3737 expect (route? .uri.path, '/product/test' );
38+ expect (ModularTracker .currentPath, '/product/test' );
39+ expect (ModularTracker .arguments.params['id' ], isNull);
3840 });
3941
4042 test ('find route with queries' , () async {
@@ -53,8 +55,7 @@ void main() {
5355 });
5456
5557 test ('find child route in other module' , () async {
56- var route =
57- await ModularTracker .findRoute ('/other/details' ) as CustomRoute ? ;
58+ var route = await ModularTracker .findRoute ('/other/details' ) as CustomRoute ? ;
5859 expect (route? .uri.path, '/other/details' );
5960 expect (route? .parent, '/other/' );
6061 expect (route? .data, 'otherWithDetails' );
@@ -64,8 +65,7 @@ void main() {
6465 });
6566
6667 test ('find child route in deep module' , () async {
67- var route =
68- await ModularTracker .findRoute ('/other/internal/' ) as CustomRoute ? ;
68+ var route = await ModularTracker .findRoute ('/other/internal/' ) as CustomRoute ? ;
6969 expect (route, isNotNull);
7070 ModularTracker .reportPushRoute (route! );
7171 expect (ModularTracker .injector.isModuleAlive <DeepModule >(), true );
@@ -75,8 +75,7 @@ void main() {
7575 ModularTracker .reportPopRoute (route);
7676 expect (ModularTracker .injector.isModuleAlive <DeepModule >(), false );
7777
78- route =
79- await ModularTracker .findRoute ('/other/internal/deep' ) as CustomRoute ? ;
78+ route = await ModularTracker .findRoute ('/other/internal/deep' ) as CustomRoute ? ;
8079 expect (route, isNotNull);
8180 ModularTracker .reportPushRoute (route! );
8281 expect (ModularTracker .injector.isModuleAlive <DeepModule >(), true );
@@ -92,15 +91,13 @@ void main() {
9291
9392 test ('find route with schema' , () async {
9493 expect (await ModularTracker .findRoute ('/schema' ), isNull);
95- final route = await ModularTracker .findRoute ('/schema' , schema: 'tag' )
96- as CustomRoute ? ;
94+ final route = await ModularTracker .findRoute ('/schema' , schema: 'tag' ) as CustomRoute ? ;
9795 expect (route? .uri.path, '/schema' );
9896 expect (route? .data, 'withSchema' );
9997 });
10098
10199 test ('find route with wildcard' , () async {
102- final route =
103- await ModularTracker .findRoute ('/wildcard/test/2' ) as CustomRoute ? ;
100+ final route = await ModularTracker .findRoute ('/wildcard/test/2' ) as CustomRoute ? ;
104101 expect (route? .uri.path, '/wildcard/test/2' );
105102 expect (route? .data, 'wildcard' );
106103 });
0 commit comments