Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
knaeckeKami committed Sep 22, 2024
1 parent ee7d10d commit d7a377f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/pokemon_explorer/test/dangling_reference_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class _MyWidget extends StatelessWidget {
}

void main() {
testWidgets("test description", (WidgetTester tester) async {
testWidgets("skips dangling references", (WidgetTester tester) async {
final client = Client(
cache: Cache(possibleTypes: possibleTypesMap),
link: Link.function((request, [forward]) {
Expand Down Expand Up @@ -93,5 +93,9 @@ void main() {
expect(find.widgetWithText(ListTile, 'name0'), findsOneWidget);
expect(find.widgetWithText(ListTile, 'name1'), findsNothing);
expect(find.widgetWithText(ListTile, 'name2'), findsOneWidget);

await tester.runAsync(() {
return tester.pump(Duration.zero);
});
});
}
3 changes: 3 additions & 0 deletions examples/pokemon_explorer/test/timer_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ void main() {
},
);
await tester.pumpWidget(_MyWidget(client));
await tester.runAsync(() {
return tester.pump(Duration.zero);
});
},
variant: policies,
);
Expand Down

0 comments on commit d7a377f

Please sign in to comment.