@@ -14,14 +14,15 @@ const expectedTestUsage = [
1414 'Run tests in a Dart or Flutter project.\n '
1515 '\n '
1616 'Usage: very_good test [arguments]\n '
17- '-h, --help Print this usage information.\n '
18- ' --coverage Whether to collect coverage information.\n '
19- '''-r, --recursive Run tests recursively for all nested packages.\n '''
20- ''' --[no-]optimization Whether to apply optimizations for test performance.\n '''
21- ' (defaults to on)\n '
22- ''' --exclude-coverage A glob which will be used to exclude files that match from the coverage.\n '''
23- '''-x, --exclude-tags Run only tests that do not have the specified tags.\n '''
24- ''' --min-coverage Whether to enforce a minimum coverage percentage.\n '''
17+ '-h, --help Print this usage information.\n '
18+ ''' --coverage Whether to collect coverage information.\n '''
19+ '''-r, --recursive Run tests recursively for all nested packages.\n '''
20+ ''' --[no-]optimization Whether to apply optimizations for test performance.\n '''
21+ ' (defaults to on)\n '
22+ ''' --exclude-coverage A glob which will be used to exclude files that match from the coverage.\n '''
23+ '''-x, --exclude-tags Run only tests that do not have the specified tags.\n '''
24+ ''' --min-coverage Whether to enforce a minimum coverage percentage.\n '''
25+ ''' --test-randomize-ordering-seed The seed to randomize the execution order of test cases within test files.\n '''
2526 '\n '
2627 'Run "very_good help" to see global options.'
2728];
@@ -177,6 +178,49 @@ void main() {
177178 ).called (1 );
178179 });
179180
181+ test ('completes normally --test-randomize-ordering-seed random' , () async {
182+ when < dynamic > (
183+ () => argResults['test-randomize-ordering-seed' ],
184+ ).thenReturn ('random' );
185+ final result = await testCommand.run ();
186+ expect (result, equals (ExitCode .success.code));
187+ verify (
188+ () => flutterTest (
189+ arguments: [
190+ '--test-randomize-ordering-seed' ,
191+ 'random' ,
192+ ...defaultArguments
193+ ],
194+ optimizePerformance: true ,
195+ progress: logger.progress,
196+ stdout: logger.write,
197+ stderr: logger.err,
198+ ),
199+ ).called (1 );
200+ });
201+
202+ test ('completes normally --test-randomize-ordering-seed 2305182648' ,
203+ () async {
204+ when < dynamic > (
205+ () => argResults['test-randomize-ordering-seed' ],
206+ ).thenReturn ('2305182648' );
207+ final result = await testCommand.run ();
208+ expect (result, equals (ExitCode .success.code));
209+ verify (
210+ () => flutterTest (
211+ arguments: [
212+ '--test-randomize-ordering-seed' ,
213+ '2305182648' ,
214+ ...defaultArguments
215+ ],
216+ optimizePerformance: true ,
217+ progress: logger.progress,
218+ stdout: logger.write,
219+ stderr: logger.err,
220+ ),
221+ ).called (1 );
222+ });
223+
180224 test ('completes normally --coverage' , () async {
181225 when < dynamic > (() => argResults['coverage' ]).thenReturn (true );
182226 final result = await testCommand.run ();
0 commit comments