Skip to content

Instantly share code, notes, and snippets.

@tianhaoz95
Created October 26, 2019 05:45
Show Gist options
  • Save tianhaoz95/5712817b82f09485b3b1b0ac894f7e09 to your computer and use it in GitHub Desktop.
Save tianhaoz95/5712817b82f09485b3b1b0ac894f7e09 to your computer and use it in GitHub Desktop.
Jest like test
testWidgets('Counter increments', (WidgetTester tester) async {
await tester.pumpWidget(MyApp());
expect(find.text('0'), findsOneWidget);
await tester.tap(find.byIcon(Icons.add));
expect(find.text('1'), findsOneWidget);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment