VGVentures / very_good_engineering

Static site for Very Good Engineering created with AstroJS. All of our best practices, tips, tricks, and demos in one convenient place!
https://engineering.verygood.ventures
10 stars 0 forks source link

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

Open MauriMiguez opened 2 weeks ago

MauriMiguez commented 2 weeks ago

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 commented 1 week ago

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

MauriMiguez commented 1 week ago

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