Skip to content

Commit ffe76a6

Browse files
test: Fix memory leaks in new tests
1 parent d41a8ea commit ffe76a6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/go_router/test/information_provider_test.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ void main() {
8282
initialLocation: initialRoute,
8383
initialExtra: null,
8484
routerNeglect: true);
85+
addTearDown(provider.dispose);
8586
provider.addListener(expectAsync0(() {}));
8687
provider.go(newRoute);
8788
provider.routerReportsNewRouteInformation(
@@ -98,6 +99,7 @@ void main() {
9899
late final GoRouteInformationProvider provider =
99100
GoRouteInformationProvider(
100101
initialLocation: initialRoute, initialExtra: null);
102+
addTearDown(provider.dispose);
101103
provider.addListener(expectAsync0(() {}));
102104
provider.go(newRoute);
103105
provider.routerReportsNewRouteInformation(

0 commit comments

Comments
 (0)