Created
October 26, 2019 05:45
-
-
Save tianhaoz95/5712817b82f09485b3b1b0ac894f7e09 to your computer and use it in GitHub Desktop.
Jest like test
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)); | |
| expect(find.text('1'), findsOneWidget); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment