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

String expression with types doesn't work on multiline test description #87

Open
MauriMiguez opened this issue Oct 17, 2024 · 2 comments
Assignees

Comments

@MauriMiguez
Copy link

MauriMiguez commented Oct 17, 2024

When running a test in isolation that happens to have a multiline description as well as using the string expression with types recommendation it throws an error (No tests match regular expression).

Note: problem does not occur when running multiple tests or running tests through command.

Example to reproduce:
image

class MyClass {
  void myMethod() {}
}

void main() {
  test(
      '$MyClass verrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrry long test description '
      'myMethod returns normally', () {
    final myClass = MyClass();

    expect(myClass.myMethod, returnsNormally);
  });
}

Error:
image

Suggestion:
Add a note to warn people about this potential problem.

@MauriMiguez MauriMiguez self-assigned this Oct 17, 2024
@MauriMiguez
Copy link
Author

I've opened an issue on dart-lang/test to see if that something that can be solved.

@MauriMiguez
Copy link
Author

The issue I opened has just been closed. Seems like dart-lang/test isn't invested in fixing it. Maybe we should re-evaluate this practice recommendation? @marwfair

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant