Skip to content

Commit

Permalink
Fix leaky test. (#149823)
Browse files Browse the repository at this point in the history
  • Loading branch information
polina-c authored Jun 6, 2024
1 parent b73cd1b commit 440b1c6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/flutter/test/material/carousel_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,14 @@ void main() {
});

testWidgets('CarouselController initialItem', (WidgetTester tester) async {
final CarouselController controller = CarouselController(initialItem: 5);
addTearDown(controller.dispose);

await tester.pumpWidget(
MaterialApp(
home: Scaffold(
body: CarouselView(
controller: CarouselController(initialItem: 5),
controller: controller,
itemExtent: 400,
children: List<Widget>.generate(10, (int index) {
return Center(
Expand Down

0 comments on commit 440b1c6

Please sign in to comment.