Skip to content

Commit

Permalink
Fix leaky test. (#149822)
Browse files Browse the repository at this point in the history
  • Loading branch information
polina-c authored Jun 6, 2024
1 parent ef386d3 commit d19d19c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/flutter/test/widgets/router_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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,
Expand Down

0 comments on commit d19d19c

Please sign in to comment.