Skip to content

test/group snippets do not add required imports automatically #5421

Closed

Description

@stephane-archer

can the sniped test for dart:

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

include import 'package:test/test.dart'; if not already included?

Activity

  1. changed the title [-]smarter `test` snippet[/-] [+]`test`/`group` snippets do not add required imports automatically[/+] on Feb 20, 2025
  2. added this to the v3.106.0 milestone on Feb 20, 2025
  3. added
    in lsp/analysis serverSomething to be fixed in the Dart analysis server
    relies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available
    on Feb 20, 2025
  4. DanTup commented on Feb 20, 2025

    @DanTup
    Member

    Thanks - I didn't realise these were missing! Got a fix in progress at https://dart-review.googlesource.com/c/sdk/+/411002

  5. DanTup commented on Mar 3, 2025

    @DanTup
    Member

    Fixed by dart-lang/sdk@48b7b37 - the change is in the SDK so this will show up in a future Dart/Flutter SDK release.

  6. stephane-archer commented on Mar 3, 2025

    @stephane-archer
    Author

    @DanTup you are the best! 😃

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 lsp/analysis serverSomething to be fixed in the Dart analysis serveris bugrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions