File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ import 'dart:math';
4
4
import 'dart:mirrors' ;
5
5
6
6
import 'package:talker/talker.dart' ;
7
+ // ignore: depend_on_referenced_packages, implementation_imports
8
+ import 'package:test_api/src/backend/invoker.dart' show Invoker;
7
9
8
10
part 'src/approvals.dart' ;
9
11
part 'src/writers/approval_text_writer.dart' ;
Original file line number Diff line number Diff line change @@ -9,12 +9,15 @@ class ApprovalNamer {
9
9
// A getter named `approved` that returns the string `'file.approved.txt'`.
10
10
String get approved => '$file .approved.txt' ;
11
11
12
- String get approvedFileName =>
13
- '${file .split ('/' ).last .split ('.dart' ).first }.approved.txt' ;
12
+ String get approvedFileName => '${file .split ('/' ).last .split ('.dart' ).first }.approved.txt' ;
14
13
15
14
// A getter named `received` that returns the string `'file.received.txt'`.
16
15
String get received => '$file .received.txt' ;
17
16
18
- String get receivedFileName =>
19
- '${file .split ('/' ).last .split ('.dart' ).first }.received.txt' ;
17
+ String get receivedFileName => '${file .split ('/' ).last .split ('.dart' ).first }.received.txt' ;
18
+
19
+ String get currentTestName {
20
+ final testName = Invoker .current? .liveTest.individualName;
21
+ return testName == null ? '' : testName.replaceAll (' ' , '_' );
22
+ }
20
23
}
You can’t perform that action at this time.
0 commit comments