Skip to content

Backticks in Flutter Test Description on VSCode cause error #4374

Closed

Description

@jxstxn1

Describe the bug
If I put two backticks in my Test Description and try to run it with the Dart & Flutter VsCode Extensions I get the following output:
No tests match regular expression "^( \(variant: .*\))?$".

Interesting fact:
If I press the run button of the main()Function which is surrounding the Test the error doesnt occur

To Reproduce
Steps to reproduce the behavior:

  1. Create a Test File and paste the test:
import 'package:flutter_test/flutter_test.dart';

void main() {
  test('`echo`', () {
    expect(1, 1);
  });
}
  1. VsCode should now you two Run | Debug Buttons. One over the main and and one over the test. Press the Run Button over the Test.

Expected behavior
I expect that the Run Button over test will behave like the Run over the main function and that backticks don't cause Reg Ex Errors

Screenshots
image

Please complete the following information:

  • Operating System and version: Ventura 13.0.1
  • VS Code version: 1.75.0
  • Dart extension version: v3.58.0
  • Dart/Flutter SDK version: Dart 2.19.0 / Flutter 3.7.0
  • Target device (if the issue relates to Flutter debugging):

Activity

  1. added
    in debuggingRelates to the debug adapter or process of running debug sessions
    on Feb 8, 2023
  2. added this to the v3.60.0 milestone on Feb 8, 2023
  3. added a commit that references this issue on Sep 2, 2025
    70f0bbf
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 debuggingRelates to the debug adapter or process of running debug sessionsis bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions