Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parens around test name prevents CodeLens links from working #4168

Closed
Tracked by #4021
DanTup opened this issue Sep 21, 2022 · 2 comments · Fixed by #4487
Closed
Tracked by #4021

Parens around test name prevents CodeLens links from working #4168

DanTup opened this issue Sep 21, 2022 · 2 comments · Fixed by #4487
Labels
in testing Relates to test execution of Dart/Flutter tests for end users is bug
Milestone

Comments

@DanTup
Copy link
Member

DanTup commented Sep 21, 2022

Noted at #1458 (comment) by @nilsreichardt.

test('foo', () {});

No tests match regular expression "^('foo')( (variant: .*))?$".

Opening this as a placeholder/reminder to ensure that once #4021 is implemented that it covers this case (which might mean that we just don't pass any test name with the line/col).

@DanTup
Copy link
Member Author

DanTup commented Mar 23, 2023

I thought this might be easy to fix without the line numbers, but it turns out the server returns the same names for these tests:

test(("test 6"), () => expect(1, equals(1)));
test('("test 6")', () => expect(1, equals(1)));
"name": "test(\"(\"test 6\")\")",
"name": "test(\"(\"test 6\")\")",

So we'll have to wait for line numbers.

@DanTup
Copy link
Member Author

DanTup commented Apr 19, 2023

In the next release (and the pre-release version just pushed today - v3.63.20240419), you can choose to have tests executed using their line numbers rather than their names. This fixes a number of issues including this one, caused by not always being able to statically compute the exact name of a test.

Test Invocation settings

Please let me know if you find any issues with this functionality!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in testing Relates to test execution of Dart/Flutter tests for end users is bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant