Created
October 24, 2019 03:45
-
-
Save tianhaoz95/0ca8927b80c32854c239183f856fe82e to your computer and use it in GitHub Desktop.
Test incrementing click count
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
testWidgets('Counter increments', (WidgetTester tester) async { | |
await tester.pumpWidget(MyApp()); | |
expect(find.text('0'), findsOneWidget); | |
await tester.tap(find.byIcon(Icons.add)); | |
await tester.pump(); | |
expect(find.text('1'), findsOneWidget); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment