Support tags when running tests from command line (#55152)

This commit is contained in:
Katarina Sheremet
2020-04-21 19:35:13 +02:00
committed by GitHub
parent 579c82e0ba
commit d8f353af5b
5 changed files with 65 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:test/test.dart' hide TypeMatcher, isInstanceOf;
void main() {
test('included', () {
expect(2 + 2, 4);
}, tags: <String>['include-tag']);
test('excluded', () {
throw 'this test should have been filtered out';
}, tags: <String>['exclude-tag']);
}