-
Notifications
You must be signed in to change notification settings - Fork 340
Description
Added by @DanTup:
Some test cases to ensure are handled:
- Run tests using line/col to support groups/test with dynamic names #4021
- Multiple tests execution #4150
- Parens around test name prevents CodeLens links from working #4168
- "No tests match regular expression...", customize regex #4099
- Debugging flutter tests fail if the descrription string has an interpolated value and a is composed of two concatenated strings #4250
Describe the bug
I have some functions to give a specific format to the descriptions of the groups and tests, like indentation, in this way it is easier to read them in the console, but when I execute a specific test, giving run in that group or test it tells me:
No tests match regular expression "^groupDescriptionFormatted\('group 1'\)".
To Reproduce
this is a minimal example:
import 'package:test/test.dart';
String groupDescriptionFormatted(String description) {
return description;
}
String subGroupDescriptionFormatted(String description) {
return '\n $description';
}
void main() {
group(
groupDescriptionFormatted('group 1'),
() {
group(subGroupDescriptionFormatted('sub group 1'), () {
test('test', () {
expect(true, isTrue);
});
});
},
);
group(
groupDescriptionFormatted('group 2'),
() {
group(subGroupDescriptionFormatted('sub group 1'), () {
test('test', () {
expect(true, isTrue);
});
});
},
);
}
If you press run or debug on a specific group or test, you can see the error, an also in the testing tab you can see that the names are the function instead of the real test name.

If you press run or debug on main, or use the command run all tests, it runs normal but also in the testing tab keep the names are the function instead of the real test name, and now also the real tests names.
Thank you.
Please complete the following information:
Operating System and version: Windows 10
VS Code version: 1.68.0
Dart extension version: 3.42.0
Dart/Flutter SDK version: flutter 3.0.1
