File tree Expand file tree Collapse file tree 6 files changed +39
-4
lines changed
fixtures/test/passingIntegration Expand file tree Collapse file tree 6 files changed +39
-4
lines changed Original file line number Diff line number Diff line change @@ -111,8 +111,6 @@ class TestCli extends TaskCli {
111111 if (isExplicitlyFalse (unit) && ! integration && individualTests == 0 ) {
112112 return new CliResult .fail (
113113 'No tests were selected. Include at least one of --unit or --integration.' );
114- } else {
115- if (individualTests == 0 ) unit = true ;
116114 }
117115
118116 if (unit) {
Original file line number Diff line number Diff line change 1+ name : integration_test_passing
2+ version : 0.0.0
3+ dev_dependencies :
4+ dart_dev :
5+ path : ../../../..
6+ test : " ^0.12.0"
Original file line number Diff line number Diff line change 1+ library integration_test_passing.test.failing_unit_test;
2+
3+ import 'package:test/test.dart' ;
4+
5+ void main () {
6+ test ('passes' , () {
7+ expect (false , isTrue);
8+ });
9+ }
Original file line number Diff line number Diff line change 1+ library integration_test_passing.test.passing_integration_test;
2+
3+ import 'package:test/test.dart' ;
4+
5+ void main () {
6+ test ('passes' , () {
7+ expect (true , isTrue);
8+ });
9+ }
Original file line number Diff line number Diff line change 1+ library integration_test_passing.tool.dev;
2+
3+ import 'package:dart_dev/dart_dev.dart' show dev, config;
4+
5+ main (List <String > args) async {
6+ config.test
7+ ..unitTests = ['test/failing_unit_test.dart' ]
8+ ..integrationTests = ['test/passing_integration_test.dart' ];
9+
10+ await dev (args);
11+ }
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ import 'package:test/test.dart';
2424const String projectWithoutTestPackage = 'test/fixtures/test/no_test_package' ;
2525const String projectWithFailingTests = 'test/fixtures/test/failing' ;
2626const String projectWithPassingTests = 'test/fixtures/test/passing' ;
27+ const String projectWithPassingIntegrationTests =
28+ 'test/fixtures/test/passingIntegration' ;
2729const String projectThatNeedsPubServe = 'test/fixtures/test/needs_pub_serve' ;
2830
2931Future <bool > runTests (String projectPath,
@@ -106,9 +108,9 @@ void main() {
106108 isTrue);
107109 });
108110
109- test ('should run integration tests' , () async {
111+ test ('should run integration tests and not unit tests ' , () async {
110112 expect (
111- await runTests (projectWithPassingTests ,
113+ await runTests (projectWithPassingIntegrationTests ,
112114 unit: false , integration: true ),
113115 isTrue);
114116 });
You can’t perform that action at this time.
0 commit comments