Support tags in testWidgets (#55141)

This commit is contained in:
Katarina Sheremet
2020-04-29 00:49:01 +02:00
committed by GitHub
parent 7b1d24216e
commit 3b067049ad
4 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('included', (WidgetTester tester) async {
expect(2 + 2, 4);
}, tags: <String>['include-tag']);
testWidgets('excluded', (WidgetTester tester) async {
throw 'this test should have been filtered out';
}, tags: <String>['exclude-tag']);
}