From fc9fd22855a8742d91f2e3097de6d9d2a6d26600 Mon Sep 17 00:00:00 2001 From: ValentinVignal Date: Tue, 15 Oct 2024 20:22:30 +0800 Subject: [PATCH] test: Fix memory leaks in new tests --- packages/go_router/test/information_provider_test.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/go_router/test/information_provider_test.dart b/packages/go_router/test/information_provider_test.dart index d47a64520c06..2bdb0e6178f9 100644 --- a/packages/go_router/test/information_provider_test.dart +++ b/packages/go_router/test/information_provider_test.dart @@ -82,6 +82,7 @@ void main() { initialLocation: initialRoute, initialExtra: null, routerNeglect: true); + addTearDown(provider.dispose); provider.addListener(expectAsync0(() {})); provider.go(newRoute); provider.routerReportsNewRouteInformation( @@ -98,6 +99,7 @@ void main() { late final GoRouteInformationProvider provider = GoRouteInformationProvider( initialLocation: initialRoute, initialExtra: null); + addTearDown(provider.dispose); provider.addListener(expectAsync0(() {})); provider.go(newRoute); provider.routerReportsNewRouteInformation(