Skip to content

Parens around test name prevents CodeLens links from working #4168

Closed

Description

@DanTup

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).

Activity

  1. added
    in testingRelates to test execution of Dart/Flutter tests for end users
    on Sep 21, 2022
  2. added this to the On Deck milestone on Sep 21, 2022
  3. modified the milestones: On Deck, v3.62.0 on Feb 27, 2023
  4. DanTup commented on Mar 23, 2023

    @DanTup
    MemberAuthor

    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.

  5. modified the milestones: v3.62.0, v3.64.0 on Mar 23, 2023
  6. DanTup commented on Apr 19, 2023

    @DanTup
    MemberAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    in testingRelates to test execution of Dart/Flutter tests for end usersis bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions