@@ -11,6 +11,7 @@ import 'package:stack_trace/stack_trace.dart' as stack_trace;
1111import 'package:test/test.dart' ;
1212import 'package:very_good_cli/src/cli/cli.dart' ;
1313import 'package:very_good_test_runner/very_good_test_runner.dart' ;
14+
1415import '../../fixtures/fixtures.dart' ;
1516
1617class _MockMasonGenerator extends Mock implements MasonGenerator {}
@@ -338,6 +339,14 @@ void main() {
338339 '\x 1B[2K\r 00:12 +7 -1: Some tests failed.\n ' ,
339340 ]),
340341 );
342+
343+ final testPath = p.join (
344+ 'test' ,
345+ 'counter' ,
346+ 'cubit' ,
347+ 'counter_cubit_test.dart' ,
348+ );
349+
341350 expect (
342351 stderrLogs,
343352 equals (
@@ -349,7 +358,7 @@ void main() {
349358 'test/counter/cubit/counter_cubit_test.dart 16:7 main.<fn>.<fn>\n ' ,
350359 '\x 1B[2K\r CounterCubit initial state is 0 ${tempDirectory .path }/test/counter/cubit/counter_cubit_test.dart (FAILED)' ,
351360 '\x 1B[2K\r Failing Tests:\n '
352- '\x 1B[2K\r - test/counter/cubit/counter_cubit_test.dart \n '
361+ '\x 1B[2K\r - $ testPath \n '
353362 '\x 1B[2K\r \t - [FAILED] CounterCubit initial state is 0\n ' ,
354363 ],
355364 ),
@@ -424,7 +433,8 @@ void main() {
424433 'The test description was: renders CounterPage' ,
425434 '\x 1B[2K\r App renders CounterPage ${tempDirectory .path }/test/app/view/app_test.dart (FAILED)' ,
426435 '\x 1B[2K\r Failing Tests:\n '
427- '\x 1B[2K\r - test/app/view/app_test.dart \n '
436+ '\x 1B[2K\r - '
437+ '${p .join ('test' , 'app' , 'view' , 'app_test.dart' )} \n '
428438 '\x 1B[2K\r \t - [ERROR] App renders CounterPage\n ' ,
429439 ]),
430440 );
@@ -528,9 +538,10 @@ void main() {
528538 stderrLogs,
529539 equals ([
530540 '\x 1B[2K\r error' ,
531- '\x 1B[2K\r test/ example_test.dart 4 main\n ' ,
541+ '\x 1B[2K\r ${ p . join ( 'test' , ' example_test.dart' )} 4 main\n ' ,
532542 '\x 1B[2K\r Failing Tests:\n '
533- '\x 1B[2K\r - test/app/view/app_test.dart \n '
543+ '\x 1B[2K\r - '
544+ '${p .join ('test' , 'app' , 'view' , 'app_test.dart' )} \n '
534545 '''\x 1B[2K\r \t - [FAILED] CounterCubit emits [1] when increment is called\n ''' ,
535546 ]),
536547 );
@@ -879,7 +890,7 @@ void main() {
879890 collectCoverage: true ,
880891 minCoverage: 100 ,
881892 excludeFromCoverage:
882- '/ bloc/packages/bloc/lib/src/bloc_observer.dart' ,
893+ 'bloc/packages/bloc/lib/src/bloc_observer.dart' ,
883894 stdout: stdoutLogs.add,
884895 stderr: stderrLogs.add,
885896 overrideTestRunner: testRunner (
@@ -1144,7 +1155,11 @@ void main() {
11441155 suite: TestSuite (
11451156 id: 4 ,
11461157 platform: 'vm' ,
1147- path: '${tempDirectory .path }/test/.test_optimizer.dart' ,
1158+ path: p.join (
1159+ tempDirectory.path,
1160+ 'test' ,
1161+ '.test_optimizer.dart' ,
1162+ ),
11481163 ),
11491164 time: 0 ,
11501165 ),
@@ -1204,9 +1219,10 @@ void main() {
12041219 stderrLogs,
12051220 equals ([
12061221 '\x 1B[2K\r error' ,
1207- '\x 1B[2K\r test/ example_test.dart 4 main\n ' ,
1222+ '\x 1B[2K\r ${ p . join ( 'test' , ' example_test.dart' )} 4 main\n ' ,
12081223 '\x 1B[2K\r Failing Tests:\n '
1209- '\x 1B[2K\r - test/app/view/app_test.dart \n '
1224+ '\x 1B[2K\r - '
1225+ '${p .join ('test' , 'app' , 'view' , 'app_test.dart' )} \n '
12101226 '''\x 1B[2K\r \t - [FAILED] CounterCubit emits [1] when increment is called\n ''' ,
12111227 ]),
12121228 );
@@ -1222,8 +1238,8 @@ void main() {
12221238 final updatedVars = < String , dynamic > {
12231239 'package-root' : tempDirectory.path,
12241240 'notOptimizedTests' : [
1225- 'app/ view/ app_test.dart' ,
1226- 'app/ cubit/ cubit_test.dart' ,
1241+ p. join ( 'app' , ' view' , ' app_test.dart') ,
1242+ p. join ( 'app' , ' cubit' , ' cubit_test.dart') ,
12271243 ],
12281244 };
12291245 File (p.join (tempDirectory.path, 'pubspec.yaml' )).createSync ();
@@ -1272,8 +1288,8 @@ void main() {
12721288 testRunnerArgs,
12731289 equals ([
12741290 p.join ('test' , '.test_optimizer.dart' ),
1275- 'test/ app/ view/ app_test.dart' ,
1276- 'test/ app/ cubit/ cubit_test.dart' ,
1291+ p. join ( 'test' , ' app' , ' view' , ' app_test.dart') ,
1292+ p. join ( 'test' , ' app' , ' cubit' , ' cubit_test.dart') ,
12771293 ]),
12781294 );
12791295 },
0 commit comments