@@ -10,7 +10,6 @@ import 'package:file/memory.dart';
1010import 'package:flutter_tools/src/base/common.dart' ;
1111import 'package:flutter_tools/src/base/file_system.dart' ;
1212import 'package:flutter_tools/src/base/logger.dart' ;
13- import 'package:flutter_tools/src/base/platform.dart' ;
1413import 'package:flutter_tools/src/cache.dart' ;
1514import 'package:flutter_tools/src/commands/test.dart' ;
1615import 'package:flutter_tools/src/device.dart' ;
@@ -156,6 +155,30 @@ dev_dependencies:
156155 Cache : () => Cache .test (processManager: FakeProcessManager .any ()),
157156 });
158157
158+ testUsingContext (
159+ 'Confirmation that the reporter and timeout args are not set by default' ,
160+ () async {
161+ final FakePackageTest fakePackageTest = FakePackageTest ();
162+
163+ final TestCommand testCommand = TestCommand (testWrapper: fakePackageTest);
164+ final CommandRunner <void > commandRunner =
165+ createTestCommandRunner (testCommand);
166+
167+ await commandRunner.run (const < String > [
168+ 'test' ,
169+ '--no-pub' ,
170+ ]);
171+
172+ expect (fakePackageTest.lastArgs, isNot (contains ('-r' )));
173+ expect (fakePackageTest.lastArgs, isNot (contains ('compact' )));
174+ expect (fakePackageTest.lastArgs, isNot (contains ('--timeout' )));
175+ expect (fakePackageTest.lastArgs, isNot (contains ('30s' )));
176+ }, overrides: < Type , Generator > {
177+ FileSystem : () => fs,
178+ ProcessManager : () => FakeProcessManager .any (),
179+ Cache : () => Cache .test (processManager: FakeProcessManager .any ()),
180+ });
181+
159182 group ('shard-index and total-shards' , () {
160183 testUsingContext ('with the params they are Piped to package:test' ,
161184 () async {
@@ -661,60 +684,6 @@ dev_dependencies:
661684 ]),
662685 });
663686
664- testUsingContext ('Tests on github actions default to github reporter' , () async {
665- final FakeFlutterTestRunner testRunner = FakeFlutterTestRunner (0 );
666-
667- final TestCommand testCommand = TestCommand (testRunner: testRunner);
668- final CommandRunner <void > commandRunner = createTestCommandRunner (testCommand);
669-
670- await commandRunner.run (const < String > [
671- 'test' ,
672- '--no-pub' ,
673- ]);
674-
675- expect (
676- testRunner.lastReporterOption,
677- 'github' ,
678- );
679- }, overrides: < Type , Generator > {
680- FileSystem : () => fs,
681- ProcessManager : () => FakeProcessManager .any (),
682- Platform : () => FakePlatform (
683- environment: < String , String > {
684- 'GITHUB_ACTIONS' : 'true' ,
685- },
686- ),
687- DeviceManager : () => _FakeDeviceManager (< Device > [
688- FakeDevice ('ephemeral' , 'ephemeral' , type: PlatformType .android),
689- ]),
690- });
691-
692- testUsingContext ('Tests default to compact reporter if not specified and not on Github actions' , () async {
693- final FakeFlutterTestRunner testRunner = FakeFlutterTestRunner (0 );
694-
695- final TestCommand testCommand = TestCommand (testRunner: testRunner);
696- final CommandRunner <void > commandRunner = createTestCommandRunner (testCommand);
697-
698- await commandRunner.run (const < String > [
699- 'test' ,
700- '--no-pub' ,
701- ]);
702-
703- expect (
704- testRunner.lastReporterOption,
705- 'compact' ,
706- );
707- }, overrides: < Type , Generator > {
708- FileSystem : () => fs,
709- ProcessManager : () => FakeProcessManager .any (),
710- Platform : () => FakePlatform (
711- environment: < String , String > {}
712- ),
713- DeviceManager : () => _FakeDeviceManager (< Device > [
714- FakeDevice ('ephemeral' , 'ephemeral' , type: PlatformType .android),
715- ]),
716- });
717-
718687 testUsingContext ('Integration tests given flavor' , () async {
719688 final FakeFlutterTestRunner testRunner = FakeFlutterTestRunner (0 );
720689
0 commit comments