Fix leaky test. (#149822)

This commit is contained in:
Polina Cherkasova 2024-06-06 11:33:27 -07:00 committed by GitHub
parent ef386d30c9
commit d19d19c2d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -41,7 +41,9 @@ void main() {
expect(find.text('update'), findsOneWidget);
});
testWidgets('Router respects update order', (WidgetTester tester) async {
testWidgets('Router respects update order',
experimentalLeakTesting: LeakTesting.settings.withCreationStackTrace(),
(WidgetTester tester) async {
final SimpleRouteInformationProvider provider = SimpleRouteInformationProvider();
addTearDown(provider.dispose);
provider.value = RouteInformation(
@ -52,6 +54,7 @@ void main() {
addTearDown(delegate.dispose);
final ValueNotifier<int> notifier = ValueNotifier<int>(0);
addTearDown(notifier.dispose);
await tester.pumpWidget(buildBoilerPlate(
IntInheritedNotifier(
notifier: notifier,